Struct valence_nbt::compound::Compound
source · [−]pub struct Compound { /* private fields */ }
Implementations
sourceimpl Compound
impl Compound
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn clear(&mut self)
pub fn get<Q>(&self, k: &Q) -> Option<&Value>where
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn contains_key<Q>(&self, k: &Q) -> boolwhere
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn get_mut<Q>(&mut self, k: &Q) -> Option<&mut Value>where
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&String, &Value)>where
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn insert<K, V>(&mut self, k: K, v: V) -> Option<Value>where
K: Into<String>,
V: Into<Value>,
pub fn remove<Q>(&mut self, k: &Q) -> Option<Value>where
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(String, Value)>where
String: Borrow<Q>,
Q: ?Sized + Eq + Ord + Hash,
pub fn entry<K>(&mut self, k: K) -> Entry<'_>where
K: Into<String>,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = (&'a String, &'a Value);
pub fn iter_mut(&mut self) -> IterMut<'_>ⓘNotable traits for IterMut<'a>impl<'a> Iterator for IterMut<'a> type Item = (&'a String, &'a mut Value);
pub fn keys(&self) -> Keys<'_>ⓘNotable traits for Keys<'a>impl<'a> Iterator for Keys<'a> type Item = &'a String;
pub fn values(&self) -> Values<'_>ⓘNotable traits for Values<'a>impl<'a> Iterator for Values<'a> type Item = &'a Value;
pub fn values_mut(&mut self) -> ValuesMut<'_>ⓘNotable traits for ValuesMut<'a>impl<'a> Iterator for ValuesMut<'a> type Item = &'a mut Value;
pub fn retain<F>(&mut self, f: F)where
F: FnMut(&String, &mut Value) -> bool,
Trait Implementations
sourceimpl Extend<(String, Value)> for Compound
impl Extend<(String, Value)> for Compound
sourcefn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (String, Value)>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (String, Value)>,
Extends a collection with the contents of an iterator. Read more
sourcefn 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.
sourcefn 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
sourceimpl FromIterator<(String, Value)> for Compound
impl FromIterator<(String, Value)> for Compound
sourceimpl<'a> IntoIterator for &'a Compound
impl<'a> IntoIterator for &'a Compound
sourceimpl<'a> IntoIterator for &'a mut Compound
impl<'a> IntoIterator for &'a mut Compound
sourceimpl IntoIterator for Compound
impl IntoIterator for Compound
impl StructuralPartialEq for Compound
Auto Trait Implementations
impl RefUnwindSafe for Compound
impl Send for Compound
impl Sync for Compound
impl Unpin for Compound
impl UnwindSafe for Compound
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more