pub struct PathMap<V> {
pub entries: Vec<(String, V)>,
}Fields§
§entries: Vec<(String, V)>Sorted by key, keys unique. Read freely; change only through the methods.
Implementations§
Source§impl<V> PathMap<V>
impl<V> PathMap<V>
pub fn new() -> Self
fn find(&self, key: &str) -> Result<usize, usize>
pub fn get(&self, key: &str) -> Option<&V>
pub fn contains_key(&self, key: &str) -> bool
pub fn insert(&mut self, key: String, value: V) -> Option<V>
pub fn remove(&mut self, key: &str) -> Option<V>
pub fn retain(&mut self, keep: impl FnMut(&String, &mut V) -> bool)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = (&String, &V)>
pub fn keys(&self) -> impl Iterator<Item = &String>
pub fn values(&self) -> impl Iterator<Item = &V>
Trait Implementations§
Source§impl<'de, V: Deserialize<'de>> Deserialize<'de> for PathMap<V>
impl<'de, V: Deserialize<'de>> Deserialize<'de> for PathMap<V>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<V> FromIterator<(String, V)> for PathMap<V>
impl<V> FromIterator<(String, V)> for PathMap<V>
Source§impl<'a, V> IntoIterator for &'a PathMap<V>
impl<'a, V> IntoIterator for &'a PathMap<V>
Source§impl<V> IntoIterator for PathMap<V>
impl<V> IntoIterator for PathMap<V>
impl<V: Eq> Eq for PathMap<V>
impl<V> StructuralPartialEq for PathMap<V>
Auto Trait Implementations§
impl<V> Freeze for PathMap<V>
impl<V> RefUnwindSafe for PathMap<V>where
V: RefUnwindSafe,
impl<V> Send for PathMap<V>where
V: Send,
impl<V> Sync for PathMap<V>where
V: Sync,
impl<V> Unpin for PathMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for PathMap<V>
impl<V> UnwindSafe for PathMap<V>where
V: 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