Skip to main content

FileReader

Trait FileReader 

Source
pub trait FileReader:
    Debug
    + Send
    + Sync
    + Read
    + Seek
    + 'static {
    // Required method
    fn byte_len(&self) -> Option<u64>;
}
Expand description

Trait for files readers ensuring they implement the required traits

Required Methods§

Source

fn byte_len(&self) -> Option<u64>

Returns the length in bytes, if available

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FileReader for BufReader<File>

Source§

impl FileReader for File

Source§

impl<T> FileReader for Cursor<T>
where T: Debug + Send + Sync + AsRef<[u8]> + 'static,

Implementors§