[][src]Struct smash_arc::QuickDir

pub struct QuickDir { /* fields omitted */ }

Directory listing for stream files

Implementations

impl QuickDir[src]

pub fn hash40(&self) -> Hash40[src]

impl QuickDir[src]

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

Returns an instance with zero initialized data.

impl QuickDir[src]

pub const fn into_bytes(self) -> [u8; 12][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; 12]) -> Self[src]

Converts the given bytes directly into the bitfield struct.

impl QuickDir[src]

pub fn hash(&self) -> <u32 as Specifier>::InOut[src]

Returns the value of hash.

pub fn hash_or_err(
    &self
) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
[src]

Returns the value of hash.

#Errors

If the returned value contains an invalid bit pattern for hash.

pub fn with_hash(mut self: Self, new_val: <u32 as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of hash set to the given value.

#Panics

If the given value is out of bounds for hash.

pub fn with_hash_checked(
    mut self: Self,
    new_val: <u32 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of hash set to the given value.

#Errors

If the given value is out of bounds for hash.

pub fn set_hash(&mut self, new_val: <u32 as Specifier>::InOut)[src]

Sets the value of hash to the given value.

#Panics

If the given value is out of bounds for hash.

pub fn set_hash_checked(
    &mut self,
    new_val: <u32 as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of hash to the given value.

#Errors

If the given value is out of bounds for hash.

pub fn name_length(&self) -> <u8 as Specifier>::InOut[src]

Returns the value of name_length.

pub fn name_length_or_err(
    &self
) -> Result<<u8 as Specifier>::InOut, InvalidBitPattern<<u8 as Specifier>::Bytes>>
[src]

Returns the value of name_length.

#Errors

If the returned value contains an invalid bit pattern for name_length.

pub fn with_name_length(
    mut self: Self,
    new_val: <u8 as Specifier>::InOut
) -> Self
[src]

Returns a copy of the bitfield with the value of name_length set to the given value.

#Panics

If the given value is out of bounds for name_length.

pub fn with_name_length_checked(
    mut self: Self,
    new_val: <u8 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of name_length set to the given value.

#Errors

If the given value is out of bounds for name_length.

pub fn set_name_length(&mut self, new_val: <u8 as Specifier>::InOut)[src]

Sets the value of name_length to the given value.

#Panics

If the given value is out of bounds for name_length.

pub fn set_name_length_checked(
    &mut self,
    new_val: <u8 as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of name_length to the given value.

#Errors

If the given value is out of bounds for name_length.

pub fn count(&self) -> <B24 as Specifier>::InOut[src]

Returns the value of count.

pub fn count_or_err(
    &self
) -> Result<<B24 as Specifier>::InOut, InvalidBitPattern<<B24 as Specifier>::Bytes>>
[src]

Returns the value of count.

#Errors

If the returned value contains an invalid bit pattern for count.

pub fn with_count(mut self: Self, new_val: <B24 as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of count set to the given value.

#Panics

If the given value is out of bounds for count.

pub fn with_count_checked(
    mut self: Self,
    new_val: <B24 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of count set to the given value.

#Errors

If the given value is out of bounds for count.

pub fn set_count(&mut self, new_val: <B24 as Specifier>::InOut)[src]

Sets the value of count to the given value.

#Panics

If the given value is out of bounds for count.

pub fn set_count_checked(
    &mut self,
    new_val: <B24 as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of count to the given value.

#Errors

If the given value is out of bounds for count.

pub fn index(&self) -> <u32 as Specifier>::InOut[src]

Returns the value of index.

pub fn index_or_err(
    &self
) -> Result<<u32 as Specifier>::InOut, InvalidBitPattern<<u32 as Specifier>::Bytes>>
[src]

Returns the value of index.

#Errors

If the returned value contains an invalid bit pattern for index.

pub fn with_index(mut self: Self, new_val: <u32 as Specifier>::InOut) -> Self[src]

Returns a copy of the bitfield with the value of index set to the given value.

#Panics

If the given value is out of bounds for index.

pub fn with_index_checked(
    mut self: Self,
    new_val: <u32 as Specifier>::InOut
) -> Result<Self, OutOfBounds>
[src]

Returns a copy of the bitfield with the value of index set to the given value.

#Errors

If the given value is out of bounds for index.

pub fn set_index(&mut self, new_val: <u32 as Specifier>::InOut)[src]

Sets the value of index to the given value.

#Panics

If the given value is out of bounds for index.

pub fn set_index_checked(
    &mut self,
    new_val: <u32 as Specifier>::InOut
) -> Result<(), OutOfBounds>
[src]

Sets the value of index to the given value.

#Errors

If the given value is out of bounds for index.

Trait Implementations

impl BinRead for QuickDir[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 QuickDir[src]

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

impl Clone for QuickDir[src]

impl Copy for QuickDir[src]

impl Debug for QuickDir[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.