LayerReader

Trait LayerReader 

Source
pub trait LayerReader<'a, R: Read + Seek>: Read + Seek {
    // Required methods
    fn into_inner(self) -> Option<Box<dyn LayerReader<'a, R> + 'a>>;
    fn into_raw(self: Box<Self>) -> R;
    fn initialize(&mut self) -> Result<(), Error>;
}
Expand description

Trait to be implemented by layer readers

Required Methods§

Source

fn into_inner(self) -> Option<Box<dyn LayerReader<'a, R> + 'a>>

Unwraps the inner reader

Source

fn into_raw(self: Box<Self>) -> R

Unwraps the original I/O reader

Source

fn initialize(&mut self) -> Result<(), Error>

Initialize the current layer, like reading the footer.

This method is responsible of recursively calling (postfix) initialize on inner layer if any

Implementors§

Source§

impl<'a, R: 'a + Read + Seek> LayerReader<'a, R> for CompressionLayerReader<'a, R>

Source§

impl<'a, R: 'a + Read + Seek> LayerReader<'a, R> for EncryptionLayerReader<'a, R>

Source§

impl<'a, R: Read + Seek> LayerReader<'a, R> for RawLayerReader<R>