pub struct Fields(/* private fields */);Expand description
Field names and values in insertion order. Inserting a name that is already there keeps its place; removing one keeps the order of the others. Equality ignores the order, as for protobuf maps.
Implementations§
Source§impl Fields
impl Fields
pub fn new() -> Fields
pub fn with_capacity(capacity: usize) -> Fields
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, key: &str) -> Option<&Value>
pub fn get_mut(&mut self, key: &str) -> Option<&mut Value>
pub fn contains_key(&self, key: &str) -> bool
Sourcepub fn insert(&mut self, key: String, value: Value) -> Option<Value>
pub fn insert(&mut self, key: String, value: Value) -> Option<Value>
Sets key, in place if it is there, else at the end.
Sourcepub fn remove(&mut self, key: &str) -> Option<Value>
pub fn remove(&mut self, key: &str) -> Option<Value>
Removes key; the fields after it keep their order.
Sourcepub fn push(&mut self, key: String, value: Value)
pub fn push(&mut self, key: String, value: Value)
Sets key at the end, moving it there if it is already present.
pub fn entry(&mut self, key: String) -> Entry<'_, String, Value>
pub fn iter(&self) -> Iter<'_, String, Value> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, String, Value> ⓘ
pub fn keys(&self) -> Keys<'_, String, Value> ⓘ
pub fn values(&self) -> Values<'_, String, Value> ⓘ
pub fn values_mut(&mut self) -> ValuesMut<'_, String, Value> ⓘ
Sourcepub fn sorted(&self) -> Vec<(&String, &Value)>
pub fn sorted(&self) -> Vec<(&String, &Value)>
The fields in Firestore’s canonical order: names by UTF-8 bytes, which is String’s
Ord. Comparisons and index keys use this order, never the stored one.
pub fn clear(&mut self)
Trait Implementations§
Source§impl Extend<(String, Value)> for Fields
impl Extend<(String, Value)> for Fields
Source§fn extend<I>(&mut self, iter: I)
fn extend<I>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl IntoIterator for Fields
impl IntoIterator for Fields
Source§impl<'a> IntoIterator for &'a Fields
impl<'a> IntoIterator for &'a Fields
Source§impl<'a> IntoIterator for &'a mut Fields
impl<'a> IntoIterator for &'a mut Fields
impl StructuralPartialEq for Fields
Auto Trait Implementations§
impl Freeze for Fields
impl RefUnwindSafe for Fields
impl Send for Fields
impl Sync for Fields
impl Unpin for Fields
impl UnsafeUnpin for Fields
impl UnwindSafe for Fields
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