Skip to main content

Stored

Struct Stored 

Source
pub struct Stored;
Expand description

Compression type 0: the stored bytes.

Trait Implementations§

Source§

impl BlockCodec for Stored

Source§

fn decode( &self, input: &Bytes, _: u32, _: &mut DecodeBuf, ) -> Result<Decoded, Error>

Decodes input, a block’s stored bytes (a slice of the bundle). uncompressed is blocks-info’s declared size; each codec treats it as UnityPy does (module docs). The output goes into out, which pays and checks the caps before it grows, and the codec returns Decoded::Written; or, with out left empty, the codec returns Decoded::Input, a range of input (the stored codec), which decode_block checks and slices. Read more
Source§

fn compressor( &self, _which: Codec, _meter: &Arc<Meter>, ) -> Result<Option<Arc<dyn BlockCodec>>, SaveError>

Capture a compressor and chunk policy for one payload, when needed. The default uses this registered codec directly.
Source§

fn decode_with_flags( &self, input: &Bytes, uncompressed: u32, _flags: u32, out: &mut DecodeBuf, ) -> Result<Decoded, Error>

Decode with the original bundle flags available to extension callbacks. Native codecs use only their registered compression type.
Source§

fn compress( &self, data: &[u8], which: Codec, meter: &Arc<Meter>, ) -> Result<Bytes, SaveError>

Compress a bundle block. The default preserves the native packer.
Source§

fn chunk_size( &self, which: Codec, _meter: &Arc<Meter>, ) -> Result<usize, SaveError>

The writer’s chunk bound, looked up once before writing the payload.
Source§

impl Clone for Stored

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Stored

Source§

impl Debug for Stored

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Stored

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Forget for Stored

§

impl Freeze for Stored

§

impl Move for Stored

§

impl RefUnwindSafe for Stored

§

impl Send for Stored

§

impl Sync for Stored

§

impl Unpin for Stored

§

impl UnsafeUnpin for Stored

§

impl UnwindSafe for Stored

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.