pub trait FileStream {
// Required methods
fn name(&self) -> &str;
fn url(&self) -> String;
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> FileReadFuture<'a>;
}Expand description
A picked file that can only be read through, once, start to end.
Required Methods§
fn name(&self) -> &str
Sourcefn read<'a>(&'a mut self, buf: &'a mut [u8]) -> FileReadFuture<'a>
fn read<'a>(&'a mut self, buf: &'a mut [u8]) -> FileReadFuture<'a>
Reads the next bytes into buf; answers how many, 0 at the end.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".