Struct crab_nbt::NbtCompound
source · pub struct NbtCompound {
pub child_tags: HashMap<String, NbtTag>,
}
Fields§
Implementations§
source§impl NbtCompound
impl NbtCompound
pub fn new() -> NbtCompound
pub fn deserialize_content(bytes: &mut impl Buf) -> Result<NbtCompound, Error>
pub fn serialize_content(&self) -> Bytes
pub fn get_byte(&self, name: &str) -> Option<i8>
pub fn get_short(&self, name: &str) -> Option<i16>
pub fn get_int(&self, name: &str) -> Option<i32>
pub fn get_long(&self, name: &str) -> Option<i64>
pub fn get_float(&self, name: &str) -> Option<f32>
pub fn get_double(&self, name: &str) -> Option<f64>
pub fn get_bool(&self, name: &str) -> Option<bool>
pub fn get_string(&self, name: &str) -> Option<&String>
pub fn get_list(&self, name: &str) -> Option<&Vec<NbtTag>>
pub fn get_compound(&self, name: &str) -> Option<&NbtCompound>
pub fn get_int_array(&self, name: &str) -> Option<&Vec<i32>>
pub fn get_long_array(&self, name: &str) -> Option<&Vec<i64>>
Trait Implementations§
source§impl AsMut<NbtCompound> for Nbt
impl AsMut<NbtCompound> for Nbt
source§fn as_mut(&mut self) -> &mut NbtCompound
fn as_mut(&mut self) -> &mut NbtCompound
Converts this type into a mutable reference of the (usually inferred) input type.
source§impl AsRef<NbtCompound> for NbtCompound
impl AsRef<NbtCompound> for NbtCompound
source§fn as_ref(&self) -> &NbtCompound
fn as_ref(&self) -> &NbtCompound
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for NbtCompound
impl Clone for NbtCompound
source§fn clone(&self) -> NbtCompound
fn clone(&self) -> NbtCompound
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for NbtCompound
impl Debug for NbtCompound
source§impl Default for NbtCompound
impl Default for NbtCompound
source§fn default() -> NbtCompound
fn default() -> NbtCompound
Returns the “default value” for a type. Read more
source§impl Extend<(String, NbtTag)> for NbtCompound
impl Extend<(String, NbtTag)> for NbtCompound
source§fn extend<T: IntoIterator<Item = (String, NbtTag)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (String, NbtTag)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn 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.
source§fn 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
source§impl From<Nbt> for NbtCompound
impl From<Nbt> for NbtCompound
source§impl From<NbtCompound> for HashMap<String, NbtTag>
impl From<NbtCompound> for HashMap<String, NbtTag>
source§fn from(value: NbtCompound) -> Self
fn from(value: NbtCompound) -> Self
Converts to this type from the input type.
source§impl From<NbtCompound> for Nbt
impl From<NbtCompound> for Nbt
source§fn from(value: NbtCompound) -> Self
fn from(value: NbtCompound) -> Self
Converts to this type from the input type.
source§impl From<NbtCompound> for NbtTag
impl From<NbtCompound> for NbtTag
source§fn from(value: NbtCompound) -> Self
fn from(value: NbtCompound) -> Self
Converts to this type from the input type.
source§impl FromIterator<(String, NbtTag)> for NbtCompound
impl FromIterator<(String, NbtTag)> for NbtCompound
source§impl IntoIterator for NbtCompound
impl IntoIterator for NbtCompound
source§impl PartialEq for NbtCompound
impl PartialEq for NbtCompound
source§fn eq(&self, other: &NbtCompound) -> bool
fn eq(&self, other: &NbtCompound) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for NbtCompound
Auto Trait Implementations§
impl Freeze for NbtCompound
impl RefUnwindSafe for NbtCompound
impl Send for NbtCompound
impl Sync for NbtCompound
impl Unpin for NbtCompound
impl UnwindSafe for NbtCompound
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