pub struct NativeMap { /* private fields */ }Expand description
Object members in document (or insertion) order, keys unique.
Implementations§
Source§impl NativeMap
impl NativeMap
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, key: &str) -> Option<&NativeValue>
pub fn get_mut(&mut self, key: &str) -> Option<&mut NativeValue>
pub fn contains_key(&self, key: &str) -> bool
Sourcepub fn insert(
&mut self,
key: impl Into<String>,
value: NativeValue,
) -> Option<NativeValue>
pub fn insert( &mut self, key: impl Into<String>, value: NativeValue, ) -> Option<NativeValue>
Replaces the value of key in place, or appends it.
pub fn remove(&mut self, key: &str) -> Option<NativeValue>
pub fn keys(&self) -> impl Iterator<Item = &str>
pub fn iter(&self) -> impl Iterator<Item = (&str, &NativeValue)>
Trait Implementations§
Source§impl From<NativeMap> for NativeValue
impl From<NativeMap> for NativeValue
Source§impl<K: Into<String>> FromIterator<(K, NativeValue)> for NativeMap
impl<K: Into<String>> FromIterator<(K, NativeValue)> for NativeMap
Source§fn from_iter<I: IntoIterator<Item = (K, NativeValue)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (K, NativeValue)>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl IntoIterator for NativeMap
impl IntoIterator for NativeMap
Auto Trait Implementations§
impl Forget for NativeMap
impl Freeze for NativeMap
impl Move for NativeMap
impl RefUnwindSafe for NativeMap
impl Send for NativeMapwhere
RawVecInner: Send,
impl Sync for NativeMapwhere
RawVecInner: Sync,
impl Unpin for NativeMap
impl UnsafeUnpin for NativeMap
impl UnwindSafe for NativeMapwhere
RawVecInner: UnwindSafe,
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