pub struct GpuFileFooter {
pub index_offset: u64,
pub index_size: u32,
pub footer_checksum: u32,
pub format_version: u32,
pub magic: [u8; 4],
}Expand description
Fixed 24-byte record at the very end of every GPU archive.
Fields§
§index_offset: u64Absolute byte offset of the TileIndexHeader from start of file.
index_size: u32Byte length of the index region.
CRC32 of bytes [0..12] of this footer.
format_version: u32Redundant copy of format version.
magic: [u8; 4]Implementations§
pub const SIZE: usize = 24
Sourcepub fn from_bytes(b: &[u8; 24]) -> Result<Self>
pub fn from_bytes(b: &[u8; 24]) -> Result<Self>
Deserialize and validate a 24-byte footer.
§Errors
CrushError::InvalidFormatif magic is wrong or checksum fails.CrushError::VersionMismatchif format version differs.
Trait Implementations§
Source§fn clone(&self) -> GpuFileFooter
fn clone(&self) -> GpuFileFooter
Returns a duplicate 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 moreAuto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.