pub struct FieldsIdsMap { /* private fields */ }
Implementations§
Source§impl FieldsIdsMap
impl FieldsIdsMap
pub fn new() -> FieldsIdsMap
Sourcepub fn insert(&mut self, name: &str) -> Option<FieldId>
pub fn insert(&mut self, name: &str) -> Option<FieldId>
Returns the field id related to a field name, it will create a new field id if the
name is not already known. Returns None
if the maximum field id as been reached.
Sourcepub fn nested_ids(&self, name: &str) -> Vec<FieldId> ⓘ
pub fn nested_ids(&self, name: &str) -> Vec<FieldId> ⓘ
Get the ids of a field and all its nested fields based on its name.
Sourcepub fn remove(&mut self, name: &str) -> Option<FieldId>
pub fn remove(&mut self, name: &str) -> Option<FieldId>
Remove a field name and id based on its name.
Sourcepub fn iter(&self) -> impl Iterator<Item = (FieldId, &str)>
pub fn iter(&self) -> impl Iterator<Item = (FieldId, &str)>
Iterate over the ids and names in the ids order.
Trait Implementations§
Source§impl Clone for FieldsIdsMap
impl Clone for FieldsIdsMap
Source§fn clone(&self) -> FieldsIdsMap
fn clone(&self) -> FieldsIdsMap
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FieldsIdsMap
impl Debug for FieldsIdsMap
Source§impl Default for FieldsIdsMap
impl Default for FieldsIdsMap
Source§fn default() -> FieldsIdsMap
fn default() -> FieldsIdsMap
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FieldsIdsMap
impl<'de> Deserialize<'de> for FieldsIdsMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FieldIdMapper for FieldsIdsMap
impl FieldIdMapper for FieldsIdsMap
Auto Trait Implementations§
impl Freeze for FieldsIdsMap
impl RefUnwindSafe for FieldsIdsMap
impl Send for FieldsIdsMap
impl Sync for FieldsIdsMap
impl Unpin for FieldsIdsMap
impl UnwindSafe for FieldsIdsMap
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more