pub struct LioCb<'a> { /* private fields */ }
Expand description
A collection of multiple asynchronous I/O operations
Implementations
sourceimpl<'a> LioCb<'a>
impl<'a> LioCb<'a>
sourcepub fn submit(&mut self) -> Result<(), LioError>
pub fn submit(&mut self) -> Result<(), LioError>
Submit an LioCb
to the aio(4)
subsystem.
If the return value is LioError::EAGAIN
, then no operations were
enqueued due to system resource limitations. The application should
free up resources and try again. If the return value is
LioError::EINCOMPLETE
, then some operations were enqueued, but
others were not, due to system resource limitations. The application
should wait for notification that the enqueued operations are complete,
then resubmit the others with resubmit
. If the
return value is LioError::EIO
, then some operations have failed to
enqueue, and cannot be resubmitted. The application should wait for
notification that the enqueued operations are complete, then examine the
result of each operation to determine the problem.
sourcepub fn resubmit(&mut self) -> Result<(), LioError>
pub fn resubmit(&mut self) -> Result<(), LioError>
Resubmit an LioCb
if it is incomplete.
If submit
returns LioError::EINCOMPLETE
, then some
operations may not have been submitted. This method will collect status
for any completed operations, then resubmit the others.
sourcepub fn into_results<F, R>(self, callback: F) -> R where
F: FnOnce(Box<dyn Iterator<Item = LioResult> + 'a>) -> R,
pub fn into_results<F, R>(self, callback: F) -> R where
F: FnOnce(Box<dyn Iterator<Item = LioResult> + 'a>) -> R,
Consume an LioCb
and collect its operations’ results.
An iterator over all operations’ results will be supplied to the callback function.
Trait Implementations
sourceimpl<'a> Source for LioCb<'a>
impl<'a> Source for LioCb<'a>
sourcefn register(
&mut self,
registry: &Registry,
token: Token,
interests: Interest
) -> Result<()>
fn register(
&mut self,
registry: &Registry,
token: Token,
interests: Interest
) -> Result<()>
Register self
with the given Registry
instance. Read more
Auto Trait Implementations
impl<'a> RefUnwindSafe for LioCb<'a>
impl<'a> Send for LioCb<'a>
impl<'a> Sync for LioCb<'a>
impl<'a> Unpin for LioCb<'a>
impl<'a> UnwindSafe for LioCb<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more