Skip to main content

CpioDecoder

Struct CpioDecoder 

Source
pub struct CpioDecoder { /* private fields */ }
Expand description

Incremental cpio decoder supporting newc, crc, odc and binary LE/BE.

Only the fixed header and pathname are retained. Regular payload bytes are borrowed directly from caller input.

Implementations§

Source§

impl CpioDecoder

Source

pub const fn new(limits: Limits) -> Self

Creates a decoder with mandatory resource limits.

Source

pub fn probe(prefix: &[u8]) -> ProbeResult<()>

Incrementally probes a cpio prefix.

Trait Implementations§

Source§

impl ArchiveDecoder for CpioDecoder

Source§

fn step<'a>( &'a mut self, input: &'a [u8], _output: &'a mut [u8], end: EndOfInput, ) -> Result<DecodeStep<'a>, ArchiveError>

Consumes archive bytes and produces at most one structural event.
Source§

impl Debug for CpioDecoder

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> 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, 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.