Trait bookdata::io::ext::LengthRead

source ·
pub trait LengthRead: Read {
    // Required method
    fn input_size(&self) -> Result<u64>;

    // Provided method
    fn read_all_sized(&mut self) -> Result<Vec<u8>> { ... }
}
Expand description

Trait for read types that can report their size.

Required Methods§

Provided Methods§

source

fn read_all_sized(&mut self) -> Result<Vec<u8>>

Read all bytes from a file, using its size to pre-allocate capacity.

Implementations on Foreign Types§

source§

impl LengthRead for File

source§

impl<'a> LengthRead for ZipFile<'a>

Implementors§