pub trait AzBufLimitedwhere
Self: Sized,{
// Required method
fn azalea_read_limited(
buf: &mut Cursor<&[u8]>,
limit: u32,
) -> Result<Self, BufReadError>;
}Expand description
Used for types that have some configurable limit.
For example, the implementation of this on String limits the maximum
length of the string.
This exists partially as an anti-abuse mechanism in Minecraft, so there is no limited write function.
Required Methods§
fn azalea_read_limited( buf: &mut Cursor<&[u8]>, limit: u32, ) -> Result<Self, BufReadError>
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.