[−][src]Struct ssb_json_msg_data::value::RidiculousStringMap
A map with string keys that sorts strings according to object entry order, using insertion order for non-int keys.
Methods
impl<V> RidiculousStringMap<V>
[src]
pub fn with_capacity(capacity: usize) -> RidiculousStringMap<V>
[src]
Create a new map with capacity for n
key-value pairs. (Does not
allocate if n
is zero.)
This only preallocates capacity for non-numeric strings.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the map.
pub fn insert(&mut self, key: String, val: V) -> Option<V>
[src]
Inserts a key-value pair into the map.
If the map did not have this key present, None
is returned.
If the map did have this key present, the value is updated, and the old
value is returned. The key is not updated, though; this matters for
types that can be ==
without being identical.
pub fn remove(&mut self, key: String) -> Option<V>
[src]
Deletes a key-value pair from the map.
pub fn iter(&self) -> Iter<V>
[src]
Gets an iterator over the entries of the map. It first yields all entries with numeric keys in ascending order, and then the remaining entries in the same order in which they were inserted.
pub fn get(&self, key: &str) -> Option<&V>
[src]
Returns a reference to the value corresponding to the key.
pub fn get_mut(&mut self, key: &str) -> Option<&mut V>
[src]
Returns a reference to the value corresponding to the key.
Trait Implementations
impl<V: Clone> Clone for RidiculousStringMap<V>
[src]
fn clone(&self) -> RidiculousStringMap<V>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<V: Debug> Debug for RidiculousStringMap<V>
[src]
impl<V: Default> Default for RidiculousStringMap<V>
[src]
fn default() -> RidiculousStringMap<V>
[src]
impl<V: Eq> Eq for RidiculousStringMap<V>
[src]
impl<'a, V> IntoIterator for &'a RidiculousStringMap<V>
[src]
type Item = (&'a String, &'a V)
The type of the elements being iterated over.
type IntoIter = Iter<'a, V>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Iter<'a, V>
[src]
impl<V: PartialEq> PartialEq<RidiculousStringMap<V>> for RidiculousStringMap<V>
[src]
fn eq(&self, other: &RidiculousStringMap<V>) -> bool
[src]
fn ne(&self, other: &RidiculousStringMap<V>) -> bool
[src]
impl<V> StructuralEq for RidiculousStringMap<V>
[src]
impl<V> StructuralPartialEq for RidiculousStringMap<V>
[src]
Auto Trait Implementations
impl<V> RefUnwindSafe for RidiculousStringMap<V> where
V: RefUnwindSafe,
V: RefUnwindSafe,
impl<V> Send for RidiculousStringMap<V> where
V: Send,
V: Send,
impl<V> Sync for RidiculousStringMap<V> where
V: Sync,
V: Sync,
impl<V> Unpin for RidiculousStringMap<V> where
V: Unpin,
V: Unpin,
impl<V> UnwindSafe for RidiculousStringMap<V> where
V: RefUnwindSafe + UnwindSafe,
V: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,