pub struct SpriteChunkDescriptor {
pub region_width: u16,
pub region_height: u16,
pub source_bytes: Range<u64>,
}
Expand description
Metadata for loading in a SpriteChunkData
.
Fields§
§region_width: u16
The width of the sprite the chunk contains.
region_height: u16
The height of the sprite the chunk contains.
source_bytes: Range<u64>
The range of bytes in the chunk data portion of the database this sprite chunk can be loaded from.
Trait Implementations§
Source§impl Clone for SpriteChunkDescriptor
impl Clone for SpriteChunkDescriptor
Source§fn clone(&self) -> SpriteChunkDescriptor
fn clone(&self) -> SpriteChunkDescriptor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SpriteChunkDescriptor
impl Debug for SpriteChunkDescriptor
Source§impl Deserialize for SpriteChunkDescriptor
impl Deserialize for SpriteChunkDescriptor
Source§const SERIALIZED_SIZE: usize = 20usize
const SERIALIZED_SIZE: usize = 20usize
The length of the buffer passed into
Deserialize::deserialize
.Source§fn deserialize(src: &[u8]) -> Self
fn deserialize(src: &[u8]) -> Self
Deserializes the byte buffer into the struct. The length of
src
must
match the same type’s Deserialize::SERIALIZED_SIZE
constant.Source§impl Serialize for SpriteChunkDescriptor
impl Serialize for SpriteChunkDescriptor
Source§const SERIALIZED_SIZE: usize = 20usize
const SERIALIZED_SIZE: usize = 20usize
The length of the buffer passed into
Serialize::serialize
.Source§fn serialize(&self, dst: &mut [u8])
fn serialize(&self, dst: &mut [u8])
Serializes the struct into the byte buffer. The length of
dst
must
match the same type’s Serialize::SERIALIZED_SIZE
constant.Auto Trait Implementations§
impl Freeze for SpriteChunkDescriptor
impl RefUnwindSafe for SpriteChunkDescriptor
impl Send for SpriteChunkDescriptor
impl Sync for SpriteChunkDescriptor
impl Unpin for SpriteChunkDescriptor
impl UnwindSafe for SpriteChunkDescriptor
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