Struct mio_aio::LioCb [−][src]
pub struct LioCb { /* fields omitted */ }
Methods
impl<'a> LioCb
[src]
impl<'a> LioCb
pub fn submit(&mut self) -> Result<(), LioError>
[src]
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.
pub fn resubmit(&mut self) -> Result<(), LioError>
[src]
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.
pub fn emplace_boxed_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: Box<Borrow<[u8]>>,
prio: i32,
opcode: LioOpcode
)
[src]
pub fn emplace_boxed_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: Box<Borrow<[u8]>>,
prio: i32,
opcode: LioOpcode
)
pub fn emplace_boxed_mut_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: Box<BorrowMut<[u8]>>,
prio: i32,
opcode: LioOpcode
)
[src]
pub fn emplace_boxed_mut_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: Box<BorrowMut<[u8]>>,
prio: i32,
opcode: LioOpcode
)
pub fn emplace_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: &'static [u8],
prio: i32,
opcode: LioOpcode
)
[src]
pub fn emplace_slice(
&mut self,
fd: RawFd,
offset: u64,
buf: &'static [u8],
prio: i32,
opcode: LioOpcode
)
pub fn into_results<F, R>(self, callback: F) -> R where
F: FnOnce(Box<Iterator<Item = LioResult> + 'a>) -> R,
[src]
pub fn into_results<F, R>(self, callback: F) -> R where
F: FnOnce(Box<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.
pub fn with_capacity(capacity: usize) -> LioCb
[src]
pub fn with_capacity(capacity: usize) -> LioCb
Trait Implementations
impl Debug for LioCb
[src]
impl Debug for LioCb
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Evented for LioCb
[src]
impl Evented for LioCb
fn register(
&self,
poll: &Poll,
token: Token,
events: Ready,
_: PollOpt
) -> Result<()>
[src]
fn register(
&self,
poll: &Poll,
token: Token,
events: Ready,
_: PollOpt
) -> Result<()>
Register self
with the given Poll
instance. Read more
fn reregister(
&self,
poll: &Poll,
token: Token,
events: Ready,
opts: PollOpt
) -> Result<()>
[src]
fn reregister(
&self,
poll: &Poll,
token: Token,
events: Ready,
opts: PollOpt
) -> Result<()>
Re-register self
with the given Poll
instance. Read more
fn deregister(&self, _: &Poll) -> Result<()>
[src]
fn deregister(&self, _: &Poll) -> Result<()>
Deregister self
from the given Poll
instance Read more