NBTWrite

Trait NBTWrite 

Source
pub trait NBTWrite {
    // Required method
    fn write<W: Write>(&self, writer: &mut W) -> Result<(), NBTError>;

    // Provided method
    fn bytes(&self) -> Result<Vec<u8>, NBTError> { ... }
}
Expand description

A trait supporting encoding of NBT Tags/Blobs into bytes.

Required Methods§

Source

fn write<W: Write>(&self, writer: &mut W) -> Result<(), NBTError>

Provided Methods§

Source

fn bytes(&self) -> Result<Vec<u8>, NBTError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§