Struct Chunk

Source
#[repr(C)]
pub struct Chunk { pub compression_type: CompressionType, /* private fields */ }
Expand description

Represents one chunk in a region

Fields§

§compression_type: CompressionType

The compression type used for the data in this chunk

Implementations§

Source§

impl Chunk

Source

pub fn boxed(&self) -> Box<Self>

Allocate this Chunk into a new Box which is owned by the caller

Source

pub fn parse(&self) -> Result<ParsedChunk>

Parse this chunk into a ParsedChunk

Allocates a new Vec into which the compressed data will be uncompressed and then parses the nbt from that Vec

Source

pub fn len(&self) -> usize

Get the length of the compressed data within this chunk

Trait Implementations§

Source§

impl Debug for Chunk

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Chunk

Source§

fn eq(&self, other: &Chunk) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Chunk

Source§

impl StructuralPartialEq for Chunk

Auto Trait Implementations§

§

impl Freeze for Chunk

§

impl RefUnwindSafe for Chunk

§

impl Send for Chunk

§

impl !Sized for Chunk

§

impl Sync for Chunk

§

impl Unpin for Chunk

§

impl UnwindSafe for Chunk

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more