pub struct Order(/* private fields */);
Expand description
A Firestore query order.
https://firebase.google.com/docs/firestore/reference/rpc/google.firestore.v1#order
use firestore_structured_query::{FieldPath, Order};
use googleapis_tonic_google_firestore_v1::google::firestore::v1::structured_query;
let order1: Order = FieldPath::raw("field1").ascending();
let order2: Order = FieldPath::raw("field2").descending();
assert_eq!(
structured_query::Order::from(order1),
structured_query::Order {
field: Some(structured_query::FieldReference {
field_path: "field1".to_string()
}),
direction: structured_query::Direction::Ascending as i32
}
);
assert_eq!(
structured_query::Order::from(order2),
structured_query::Order {
field: Some(structured_query::FieldReference {
field_path: "field2".to_string()
}),
direction: structured_query::Direction::Descending as i32
}
);
Trait Implementations§
impl StructuralPartialEq for Order
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnwindSafe for Order
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request