pub struct MipblockData {
pub video_memory_requirement: usize,
pub header: Vec<u8>,
pub data: Vec<u8>,
}Fields§
§video_memory_requirement: usize§header: Vec<u8>§data: Vec<u8>Implementations§
Source§impl MipblockData
impl MipblockData
pub fn from_file<P: AsRef<Path>>( path: P, woa_version: WoaVersion, ) -> Result<Self, TextureMapError>
pub fn from_memory( data: &[u8], woa_version: WoaVersion, ) -> Result<Self, TextureMapError>
pub fn video_memory_requirement(&self) -> usize
pub fn pack_to_vec( &self, woa_version: WoaVersion, ) -> Result<Vec<u8>, TexturePackerError>
pub fn pack_to_file<P: AsRef<Path>>( &self, path: P, woa_version: WoaVersion, ) -> Result<(), TexturePackerError>
Trait Implementations§
Source§impl Clone for MipblockData
impl Clone for MipblockData
Source§fn clone(&self) -> MipblockData
fn clone(&self) -> MipblockData
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 moreSource§impl Debug for MipblockData
impl Debug for MipblockData
Source§impl<'de> Deserialize<'de> for MipblockData
impl<'de> Deserialize<'de> for MipblockData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<MipblockData> for Vec<u8>
impl From<MipblockData> for Vec<u8>
Source§fn from(value: MipblockData) -> Self
fn from(value: MipblockData) -> Self
Converts to this type from the input type.
Source§impl GlacierResource for MipblockData
impl GlacierResource for MipblockData
type Output = MipblockData
fn process_data<R: AsRef<[u8]>>( woa_version: WoaVersion, data: R, ) -> Result<Self::Output, GlacierResourceError>
fn serialize( &self, woa_version: WoaVersion, ) -> Result<Vec<u8>, GlacierResourceError>
fn resource_type() -> [u8; 4]
fn video_memory_requirement(&self) -> u64
fn system_memory_requirement(&self) -> u64
fn should_scramble(&self) -> bool
fn should_compress(&self) -> bool
Auto Trait Implementations§
impl Freeze for MipblockData
impl RefUnwindSafe for MipblockData
impl Send for MipblockData
impl Sync for MipblockData
impl Unpin for MipblockData
impl UnwindSafe for MipblockData
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more