Trait ReadExt

Source
pub trait ReadExt {
    // Required methods
    fn read_any_string(&self) -> impl Future<Output = Result<String>>;
    fn read_bytes(&self) -> impl Future<Output = Result<Vec<u8>>>;
}
Expand description

Reads a file with some encoded string trait.

Required Methods§

Source

fn read_any_string(&self) -> impl Future<Output = Result<String>>

Reads a file with some encoded string.

Source

fn read_bytes(&self) -> impl Future<Output = Result<Vec<u8>>>

Read bytes.

§Errors
  • If the path does not exist.
  • When an interrupt is received during reading.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<P> ReadExt for P
where P: AsRef<Path>,