[][src]Struct smash_arc::FileDataFlags

pub struct FileDataFlags { /* fields omitted */ }

Flags indicating the type of compression, if any, to use

Implementations

impl FileDataFlags[src]

pub const fn new() -> Self[src]

Returns an instance with zero initialized data.

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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

impl CheckTotalSizeMultipleOf8 for FileDataFlags[src]

type Size = TotalSize<[(); 0]>

impl Clone for FileDataFlags[src]

impl Copy for FileDataFlags[src]

impl Debug for FileDataFlags[src]

impl Eq for FileDataFlags[src]

impl Hash for FileDataFlags[src]

impl PartialEq<FileDataFlags> for FileDataFlags[src]

impl StructuralEq for FileDataFlags[src]

impl StructuralPartialEq for FileDataFlags[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.