[−][src]Struct bdf::chunks::GenericChunk
Fields
length: u32data: Vec<u8>crc: u32Methods
impl GenericChunk[src]
pub fn serialize(&mut self) -> Vec<u8>[src]
Serializes the chunk to a vector of bytes
pub fn data_entries(
&mut self,
lookup_table: &HashLookupTable
) -> Result<Vec<DataEntry>, Error>[src]
&mut self,
lookup_table: &HashLookupTable
) -> Result<Vec<DataEntry>, Error>
Returns the data entries of the chunk
pub fn from_data_entries(
entries: &Vec<DataEntry>,
lookup_table: &HashLookupTable
) -> GenericChunk[src]
entries: &Vec<DataEntry>,
lookup_table: &HashLookupTable
) -> GenericChunk
Constructs the chunk from a Vec of Data entries and a hash lookup table
pub fn compress(&mut self, level: u32) -> Result<(), Error>[src]
Compresses the data of the chunk using lzma with a level of 6
pub fn decompress(&mut self) -> Result<(), Error>[src]
Decompresses the data of the chunk with lzma
Trait Implementations
impl Clone for GenericChunk[src]
fn clone(&self) -> GenericChunk[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for GenericChunk[src]
impl<'_> From<&'_ HashLookupTable> for GenericChunk[src]
fn from(chunk: &HashLookupTable) -> GenericChunk[src]
impl<'_> From<&'_ MetaChunk> for GenericChunk[src]
fn from(chunk: &MetaChunk) -> GenericChunk[src]
impl TryFrom<GenericChunk> for MetaChunk[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(chunk: GenericChunk) -> Result<MetaChunk, Error>[src]
impl TryFrom<GenericChunk> for HashLookupTable[src]
type Error = Error
The type returned in the event of a conversion error.
fn try_from(chunk: GenericChunk) -> Result<HashLookupTable, Error>[src]
Auto Trait Implementations
impl RefUnwindSafe for GenericChunk
impl Send for GenericChunk
impl Sync for GenericChunk
impl Unpin for GenericChunk
impl UnwindSafe for GenericChunk
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,
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.
fn to_owned(&self) -> T[src]
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.
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>,