pub trait AzBuf: Sized {
// Required methods
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>;
fn azalea_write(&self, buf: &mut impl Write) -> Result<(), Error>;
}Expand description
A trait that’s implemented on types that are used by the Minecraft protocol.
Required Methods§
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
fn azalea_write(&self, buf: &mut impl Write) -> Result<(), Error>
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.
Implementations on Foreign Types§
Source§impl AzBuf for FormattedText
Available on crate features azalea-buf and simdnbt only.
impl AzBuf for FormattedText
Available on crate features
azalea-buf and simdnbt only.fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<FormattedText, BufReadError>
fn azalea_write(&self, buf: &mut impl Write) -> Result<(), Error>
Source§impl AzBuf for NumberFormat
Available on crate feature azalea-buf only.
impl AzBuf for NumberFormat
Available on crate feature
azalea-buf only.