Struct firestore_structured_query::FieldPath
source · pub struct FieldPath { /* private fields */ }
Expand description
A Firestore Field Path.
https://firebase.google.com/docs/firestore/quotas#collections_documents_and_fields
- Must separate field names with a single period (
.
)- May be passed as a dot-delimited (
.
) string of segments where each segment is either a simple field name or a quoted field name (defined below).A simple field name is one where all of the following are true:
- Contains only the characters
a-z
,A-Z
,0-9
, and underscore (_
)- Does not start with
0-9
A quoted field name starts and ends with the backtick character (
`
). For example,foo.`x&y`
refers to thex&y
field nested under thefoo
field. To construct a field name with the backtick character, escape the backtick character with the backslash character (\
). For convenience, you can avoid quoted field names by passing the field path as a FieldPath object (for example, see JavaScript FieldPath).
§Examples
use firestore_structured_query::FieldPath;
use google_api_proto::google::firestore::v1::structured_query;
let field_path1 = FieldPath::raw("field1");
assert_eq!(
structured_query::FieldReference::from(field_path1),
structured_query::FieldReference {
field_path: "field1".to_string(),
}
);
Implementations§
source§impl FieldPath
impl FieldPath
pub fn array_contains<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn array_contains_any<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn equal<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn greater_than<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn greater_than_or_equal<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn in<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn is_nan(&self) -> Result<Filter>
pub fn is_not_nan(&self) -> Result<Filter>
pub fn is_not_null(&self) -> Result<Filter>
pub fn is_null(&self) -> Result<Filter>
pub fn less_than<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn less_than_or_equal<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn not_equal<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
pub fn not_in<T>(&self, value: T) -> Result<Filter>where
T: IntoValue,
Trait Implementations§
source§impl From<FieldPath> for FieldReference
impl From<FieldPath> for FieldReference
source§impl Ord for FieldPath
impl Ord for FieldPath
source§impl PartialEq for FieldPath
impl PartialEq for FieldPath
source§impl PartialOrd for FieldPath
impl PartialOrd for FieldPath
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for FieldPath
impl StructuralPartialEq for FieldPath
Auto Trait Implementations§
impl RefUnwindSafe for FieldPath
impl Send for FieldPath
impl Sync for FieldPath
impl Unpin for FieldPath
impl UnwindSafe for FieldPath
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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