pub struct Compound<'a> { /* private fields */ }Expand description
Represents TAG_Compound, a list of key/value pairs. The order of the entries is the same that they appear in the file, although this usually is not significant.
§Example
if let Some(entry) = compound.find_first_key("Health") {
if let Some(health) = entry.value().to_i64() {
println!("Player has {} health", health);
}
}Implementations§
Trait Implementations§
Source§impl<'a> PartialEq for Compound<'a>
impl<'a> PartialEq for Compound<'a>
impl<'a> StructuralPartialEq for Compound<'a>
Auto Trait Implementations§
impl<'a> Freeze for Compound<'a>
impl<'a> RefUnwindSafe for Compound<'a>
impl<'a> Send for Compound<'a>
impl<'a> Sync for Compound<'a>
impl<'a> Unpin for Compound<'a>
impl<'a> UnsafeUnpin for Compound<'a>
impl<'a> UnwindSafe for Compound<'a>
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