pub struct Pooled { /* private fields */ }Expand description
A file whose batched reads go through a Pool.
Everything else is the file underneath, unchanged. read_at in particular stays synchronous on
the calling thread, because handing one read to another thread and then blocking on it is two
context switches to do what the caller was going to do anyway.
Implementations§
Trait Implementations§
Source§impl File for Pooled
impl File for Pooled
Source§fn submit(&self, requests: Vec<Request>) -> Completion
fn submit(&self, requests: Vec<Request>) -> Completion
States every read the caller wants and hands back something to wait on or poll. Read more
Source§fn truncate(&self, len: u64) -> Result<()>
fn truncate(&self, len: u64) -> Result<()>
Cuts the file to
len bytes, or extends it with zeroes. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for Pooled
impl !UnwindSafe for Pooled
impl Freeze for Pooled
impl Send for Pooled
impl Sync for Pooled
impl Unpin for Pooled
impl UnsafeUnpin for Pooled
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