Trait nbt::NBTRead[][src]

pub trait NBTRead: Sized {
    fn read<R: Read>(reader: &mut R) -> Result<Self, NBTError>;

    fn from_bytes<B: AsRef<[u8]>>(data: B) -> Result<Self, NBTError> { ... }
}

A trait supporting decoding of bytes into NBT/Tags.

This trait provides two functions:

  • read for reading from a readable source or buffer
  • from_bytes for reading from a array of bytes

Required methods

fn read<R: Read>(reader: &mut R) -> Result<Self, NBTError>[src]

Function for reading from a buffer.

Loading content...

Provided methods

fn from_bytes<B: AsRef<[u8]>>(data: B) -> Result<Self, NBTError>[src]

Function for reading from a byte array.

Loading content...

Implementors

impl NBTRead for Tag[src]

impl NBTRead for Blob[src]

Loading content...