pub struct Attrs {
pub attrs: HashTrieMapSync<String, Value>,
}Expand description
节点属性
Fields§
§attrs: HashTrieMapSync<String, Value>Implementations§
Methods from Deref<Target = HashTrieMapSync<String, Value>>§
pub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
pub fn insert(&self, key: K, value: V) -> HashTrieMap<K, V, P, H>
pub fn insert_mut(&mut self, key: K, value: V)
pub fn remove<Q>(&self, key: &Q) -> HashTrieMap<K, V, P, H>
pub fn remove_mut<Q>(&mut self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Sourcepub fn ptr_eq<PO, HO>(&self, other: &HashTrieMap<K, V, PO, HO>) -> boolwhere
PO: SharedPointerKind,
HO: BuildHasher,
pub fn ptr_eq<PO, HO>(&self, other: &HashTrieMap<K, V, PO, HO>) -> boolwhere
PO: SharedPointerKind,
HO: BuildHasher,
Test whether the two maps refer to the same content in memory.
This would return true if you’re comparing a map to itself, or if you’re comparing a map to a fresh clone of itself.
pub fn size(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter( &self, ) -> Map<IterPtr<'_, K, V, P>, fn(&SharedPointer<Entry<K, V>, P>) -> (&K, &V)> ⓘ
pub fn keys( &self, ) -> Map<Map<IterPtr<'_, K, V, P>, fn(&SharedPointer<Entry<K, V>, P>) -> (&K, &V)>, fn((&K, &V)) -> &K> ⓘ
pub fn values( &self, ) -> Map<Map<IterPtr<'_, K, V, P>, fn(&SharedPointer<Entry<K, V>, P>) -> (&K, &V)>, fn((&K, &V)) -> &V> ⓘ
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attrs
impl<'de> Deserialize<'de> for Attrs
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
impl Eq for Attrs
impl StructuralPartialEq for Attrs
Auto Trait Implementations§
impl Freeze for Attrs
impl RefUnwindSafe for Attrs
impl Send for Attrs
impl Sync for Attrs
impl Unpin for Attrs
impl UnwindSafe for Attrs
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§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