pub struct OpenedAsyncReader { /* private fields */ }Expand description
An already-open asynchronous reader bound to provider identity.
§Examples
use qubit_fs::metadata::{FileKind, FileMetadata, FileSystemId, OpenedFileInfo};
use qubit_fs::path::Path;
use qubit_fs::spi::OpenedAsyncReader;
let info = OpenedFileInfo::new(FileSystemId::new("doc")?, Path::parse("/x")?)
.with_metadata(FileMetadata::new(FileKind::File));
assert!(std::any::type_name::<OpenedAsyncReader>().contains("OpenedAsyncReader"));
assert_eq!("/x", info.path().as_str());Implementations§
Source§impl OpenedAsyncReader
impl OpenedAsyncReader
Sourcepub fn new(
info: OpenedFileInfo,
reader: Box<dyn AsyncInput<Item = u8> + Send>,
) -> Self
pub fn new( info: OpenedFileInfo, reader: Box<dyn AsyncInput<Item = u8> + Send>, ) -> Self
Sourcepub fn info(&self) -> &OpenedFileInfo
pub fn info(&self) -> &OpenedFileInfo
Auto Trait Implementations§
impl !RefUnwindSafe for OpenedAsyncReader
impl !Sync for OpenedAsyncReader
impl !UnwindSafe for OpenedAsyncReader
impl Freeze for OpenedAsyncReader
impl Send for OpenedAsyncReader
impl Unpin for OpenedAsyncReader
impl UnsafeUnpin for OpenedAsyncReader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more