Skip to main content

FileReading

Trait FileReading 

Source
pub trait FileReading: FileOperation {
    type Reader<'scheduler>: FileReader + 'scheduler
       where Self: 'scheduler;

    // Required method
    fn file_reader(&self, file: &Self::File) -> Result<Self::Reader<'_>>;
}
Expand description

Construct a sequential file reader bound to this scheduler. Backends select the handle representation; protocols need no monitor or raw dispatch capabilities.

Required Associated Types§

Source

type Reader<'scheduler>: FileReader + 'scheduler where Self: 'scheduler

The scheduler-bound reader returned by file_reader.

Required Methods§

Source

fn file_reader(&self, file: &Self::File) -> Result<Self::Reader<'_>>

Retain the file and reusable backend state without submitting I/O. The file reference need not live as long as the returned handle. Cancellation remains an operation argument.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§