[−][src]Struct smash_arc::FileDataFlags
Flags indicating the type of compression, if any, to use
Implementations
impl FileDataFlags
[src]
impl FileDataFlags
[src]
pub const fn into_bytes(self) -> [u8; 4]
[src]
Returns the underlying bits.
Layout
The returned byte array is layed out in the same way as described here.
pub const fn from_bytes(bytes: [u8; 4]) -> Self
[src]
Converts the given bytes directly into the bitfield struct.
impl FileDataFlags
[src]
pub fn compressed(&self) -> <bool as Specifier>::InOut
[src]
Returns the value of compressed.
pub fn compressed_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of compressed.
#Errors
If the returned value contains an invalid bit pattern for compressed.
pub fn with_compressed(
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Self
[src]
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Self
Returns a copy of the bitfield with the value of compressed set to the given value.
#Panics
If the given value is out of bounds for compressed.
pub fn with_compressed_checked(
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of compressed set to the given value.
#Errors
If the given value is out of bounds for compressed.
pub fn set_compressed(&mut self, new_val: <bool as Specifier>::InOut)
[src]
Sets the value of compressed to the given value.
#Panics
If the given value is out of bounds for compressed.
pub fn set_compressed_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
Sets the value of compressed to the given value.
#Errors
If the given value is out of bounds for compressed.
pub fn use_zstd(&self) -> <bool as Specifier>::InOut
[src]
Returns the value of use_zstd.
pub fn use_zstd_or_err(
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
[src]
&self
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of use_zstd.
#Errors
If the returned value contains an invalid bit pattern for use_zstd.
pub fn with_use_zstd(
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Self
[src]
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Self
Returns a copy of the bitfield with the value of use_zstd set to the given value.
#Panics
If the given value is out of bounds for use_zstd.
pub fn with_use_zstd_checked(
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]
mut self: Self,
new_val: <bool as Specifier>::InOut
) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of use_zstd set to the given value.
#Errors
If the given value is out of bounds for use_zstd.
pub fn set_use_zstd(&mut self, new_val: <bool as Specifier>::InOut)
[src]
Sets the value of use_zstd to the given value.
#Panics
If the given value is out of bounds for use_zstd.
pub fn set_use_zstd_checked(
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]
&mut self,
new_val: <bool as Specifier>::InOut
) -> Result<(), OutOfBounds>
Sets the value of use_zstd to the given value.
#Errors
If the given value is out of bounds for use_zstd.
pub fn unk(&self) -> <B30 as Specifier>::InOut
[src]
Returns the value of unk.
pub fn unk_or_err(
&self
) -> Result<<B30 as Specifier>::InOut, InvalidBitPattern<<B30 as Specifier>::Bytes>>
[src]
&self
) -> Result<<B30 as Specifier>::InOut, InvalidBitPattern<<B30 as Specifier>::Bytes>>
Returns the value of unk.
#Errors
If the returned value contains an invalid bit pattern for unk.
pub fn with_unk(mut self: Self, new_val: <B30 as Specifier>::InOut) -> Self
[src]
Returns a copy of the bitfield with the value of unk set to the given value.
#Panics
If the given value is out of bounds for unk.
pub fn with_unk_checked(
mut self: Self,
new_val: <B30 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]
mut self: Self,
new_val: <B30 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of unk set to the given value.
#Errors
If the given value is out of bounds for unk.
pub fn set_unk(&mut self, new_val: <B30 as Specifier>::InOut)
[src]
Sets the value of unk to the given value.
#Panics
If the given value is out of bounds for unk.
pub fn set_unk_checked(
&mut self,
new_val: <B30 as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]
&mut self,
new_val: <B30 as Specifier>::InOut
) -> Result<(), OutOfBounds>
Sets the value of unk to the given value.
#Errors
If the given value is out of bounds for unk.
Trait Implementations
impl BinRead for FileDataFlags
[src]
type Args = ()
The type of arguments needed to be supplied in order to read this type, usually a tuple. Read more
fn read_options<R: Read + Seek>(
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
[src]
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<Self>
fn after_parse<R: Read + Seek>(
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
[src]
&mut self,
__binread_generated_var_reader: &mut R,
__binread_generated_var_options: &ReadOptions,
__binread_generated_var_arguments: Self::Args
) -> BinResult<()>
pub fn read<R>(reader: &mut R) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn read_args<R>(reader: &mut R, args: Self::Args) -> Result<Self, Error> where
R: Read + Seek,
[src]
R: Read + Seek,
pub fn args_default() -> Option<Self::Args>
[src]
impl CheckTotalSizeMultipleOf8 for FileDataFlags
[src]
impl Clone for FileDataFlags
[src]
fn clone(&self) -> FileDataFlags
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FileDataFlags
[src]
impl Debug for FileDataFlags
[src]
impl Eq for FileDataFlags
[src]
impl Hash for FileDataFlags
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<FileDataFlags> for FileDataFlags
[src]
fn eq(&self, other: &FileDataFlags) -> bool
[src]
fn ne(&self, other: &FileDataFlags) -> bool
[src]
impl StructuralEq for FileDataFlags
[src]
impl StructuralPartialEq for FileDataFlags
[src]
Auto Trait Implementations
impl RefUnwindSafe for FileDataFlags
[src]
impl Send for FileDataFlags
[src]
impl Sync for FileDataFlags
[src]
impl Unpin for FileDataFlags
[src]
impl UnwindSafe for FileDataFlags
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,