pub struct Location {
pub offset: [u8; 3],
pub size: u8,
}Expand description
Location data
Fields§
§offset: [u8; 3]The offset of the chunk
size: u8The size of the data
Implementations§
source§impl Location
impl Location
sourcepub fn to_slice(&self) -> [u8; 4]
pub fn to_slice(&self) -> [u8; 4]
Converts the Location into a slice of bytes
§Example
use level_lib::anvil::region::Location;
let loc = Location::new([0,0,1], 2);
let loc_slice = loc.to_slice();
assert_eq!(loc_slice, [0,0,1,2]);sourcepub fn get_offset(&self) -> u32
pub fn get_offset(&self) -> u32
directly returns the offset as an u32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnwindSafe for Location
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more