pub struct Source<T> { /* private fields */ }
Expand description
A Mio source based on a single POSIX AIO operation.
The generic parameter specifies exactly which operation it is. This struct
implements mio::Source
. After creation, use mio::Source::register
to
connect it to the event loop.
Implementations§
source§impl<'a> Source<AioFsync<'a>>
impl<'a> Source<AioFsync<'a>>
sourcepub fn fsync(fd: BorrowedFd<'a>, mode: AioFsyncMode, prio: i32) -> Self
pub fn fsync(fd: BorrowedFd<'a>, mode: AioFsyncMode, prio: i32) -> Self
Asynchronously fsync a file.
source§impl<'a> Source<AioReadv<'a>>
impl<'a> Source<AioReadv<'a>>
sourcepub fn readv_at(
fd: BorrowedFd<'a>,
offs: u64,
bufs: &mut [IoSliceMut<'a>],
prio: i32
) -> Self
pub fn readv_at( fd: BorrowedFd<'a>, offs: u64, bufs: &mut [IoSliceMut<'a>], prio: i32 ) -> Self
Asynchronously read from a file to a scatter/gather list of buffers.
Requires FreeBSD 13.0 or later.
Trait Implementations§
source§impl<T: Aio> Source for Source<T>
impl<T: Aio> Source for Source<T>
source§impl<T: Aio> SourceApi for Source<T>
impl<T: Aio> SourceApi for Source<T>
§type Output = <T as Aio>::Output
type Output = <T as Aio>::Output
Return type of
SourceApi::aio_return
.source§fn aio_return(self: Pin<&mut Self>) -> Result<Self::Output>
fn aio_return(self: Pin<&mut Self>) -> Result<Self::Output>
Read the final result of the operation
source§fn cancel(self: Pin<&mut Self>) -> Result<AioCancelStat>
fn cancel(self: Pin<&mut Self>) -> Result<AioCancelStat>
Ask the operating system to cancel the operation Read more
source§fn error(self: Pin<&mut Self>) -> Result<()>
fn error(self: Pin<&mut Self>) -> Result<()>
Retrieve the status of an in-progress or complete operation. Read more
source§fn in_progress(&self) -> bool
fn in_progress(&self) -> bool
Does this operation currently have any in-kernel state?
Auto Trait Implementations§
impl<T> Freeze for Source<T>where
T: Freeze,
impl<T> RefUnwindSafe for Source<T>where
T: RefUnwindSafe,
impl<T> Send for Source<T>where
T: Send,
impl<T> Sync for Source<T>where
T: Sync,
impl<T> Unpin for Source<T>where
T: Unpin,
impl<T> UnwindSafe for Source<T>where
T: UnwindSafe,
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