pub enum Nbt {
}
Variants§
End
Byte(i8)
Short(i16)
Int(i32)
Long(i64)
Float(f32)
Double(f64)
ByteArray(Vec<u8>)
Str(String)
List
Compound
Fields
§
children: LinkedHashMap<String, Nbt>
IntArray(Vec<i32>)
LongArray(Vec<i64>)
Implementations§
Source§impl Nbt
impl Nbt
pub fn make_singleton_compound(key: String, value: Nbt) -> Nbt
pub fn make_compound(values: Vec<(String, Nbt)>) -> Nbt
pub fn nbt_type(&self) -> NbtType
pub fn parse(buf: &mut BytesMut) -> Result<Nbt>
pub fn serialize(self, buf: &mut BytesMut)
pub fn child(&self, key: &str) -> Result<&Nbt>
pub fn unwrap_i8(&self) -> Result<i8>
pub fn unwrap_i16(&self) -> Result<i16>
pub fn unwrap_i32(&self) -> Result<i32>
pub fn unwrap_i64(&self) -> Result<i64>
pub fn unwrap_f32(&self) -> Result<f32>
pub fn unwrap_f64(&self) -> Result<f64>
pub fn unwrap_bytes(&self) -> Result<&[u8]>
pub fn unwrap_str(&self) -> Result<&str>
pub fn unwrap_compound(&self) -> Result<&LinkedHashMap<String, Nbt>>
pub fn unwrap_list(&self) -> Result<&[Nbt]>
pub fn unwrap_ints(&self) -> Result<&[i32]>
pub fn unwrap_longs(&self) -> Result<&[i64]>
Trait Implementations§
impl StructuralPartialEq for Nbt
Auto Trait Implementations§
impl Freeze for Nbt
impl RefUnwindSafe for Nbt
impl Send for Nbt
impl Sync for Nbt
impl Unpin for Nbt
impl UnwindSafe for Nbt
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