pub struct Mapping { /* private fields */ }Expand description
A YAML mapping in which the keys and values are both serde_yaml::Value.
Implementations§
Source§impl Mapping
impl Mapping
pub fn new() -> Mapping
pub fn with_capacity(capacity: usize) -> Mapping
pub fn reserve(&mut self, additional: usize)
pub fn shrink_to_fit(&mut self)
pub fn insert(&mut self, k: Value, v: Value) -> Option<Value>
pub fn contains_key(&self, k: &Value) -> bool
pub fn get(&self, k: &Value) -> Option<&Value>
pub fn get_mut(&mut self, k: &Value) -> Option<&mut Value>
pub fn remove(&mut self, k: &Value) -> Option<Value>
pub fn capacity(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn iter(&self) -> Iter<'_>
pub fn iter_mut(&mut self) -> IterMut<'_>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Mapping
impl<'de> Deserialize<'de> for Mapping
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Mapping, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Mapping, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Extend<(Value, Value)> for Mapping
impl Extend<(Value, Value)> for Mapping
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: A)
fn extend_one(&mut self, item: A)
🔬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<'a> IntoIterator for &'a Mapping
impl<'a> IntoIterator for &'a Mapping
Source§impl<'a> IntoIterator for &'a mut Mapping
impl<'a> IntoIterator for &'a mut Mapping
Source§impl IntoIterator for Mapping
impl IntoIterator for Mapping
Source§impl PartialOrd for Mapping
impl PartialOrd for Mapping
Source§impl Serialize for Mapping
impl Serialize for Mapping
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Mapping
impl StructuralPartialEq for Mapping
Auto Trait Implementations§
impl Freeze for Mapping
impl RefUnwindSafe for Mapping
impl Send for Mapping
impl Sync for Mapping
impl Unpin for Mapping
impl UnwindSafe for Mapping
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<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.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