Struct CompressedData
struct CompressedData<'data> { ... }
Data that may be compressed.
Returned by ObjectSection::compressed_data.
Fields
format: CompressionFormatThe data compression format.
data: &'data [u8]The compressed data.
uncompressed_size: u64The uncompressed data size.
Implementations
impl<'data> CompressedData<'data>
fn none(data: &'data [u8]) -> SelfData that is uncompressed.
fn decompress(self: Self) -> Result<Cow<'data, [u8]>>Return the uncompressed data.
Returns an error for invalid data or unsupported compression. This includes if the data is compressed but the
compressionfeature for this crate is disabled.
impl<'data> Clone for CompressedData<'data>
fn clone(self: &Self) -> CompressedData<'data>
impl<'data> Copy for CompressedData<'data>
impl<'data> Debug for CompressedData<'data>
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl<'data> Eq for CompressedData<'data>
impl<'data> Freeze for CompressedData<'data>
impl<'data> Hash for CompressedData<'data>
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl<'data> PartialEq for CompressedData<'data>
fn eq(self: &Self, other: &CompressedData<'data>) -> bool
impl<'data> RefUnwindSafe for CompressedData<'data>
impl<'data> Send for CompressedData<'data>
impl<'data> StructuralPartialEq for CompressedData<'data>
impl<'data> Sync for CompressedData<'data>
impl<'data> Unpin for CompressedData<'data>
impl<'data> UnwindSafe for CompressedData<'data>
impl<T> Any for CompressedData<'data>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CompressedData<'data>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CompressedData<'data>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for CompressedData<'data>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for CompressedData<'data>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for CompressedData<'data>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for CompressedData<'data>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CompressedData<'data>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CompressedData<'data>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>