Struct calloop::io::Async[][src]

pub struct Async<'l, F: AsRawFd> { /* fields omitted */ }

Adapter for async IO manipulations

This type wraps an IO object, providing methods to create futures waiting for its readiness.

If the futures-io cargo feature is enabled, it also implements AsyncRead and/or AsyncWrite if the underlying type implements Read and/or Write.

Note that this adapter and the futures procuded from it and not threadsafe.

Implementations

impl<'l, F: AsRawFd> Async<'l, F>[src]

pub fn get_mut(&mut self) -> &mut F[src]

Mutably access the underlying IO object

pub fn readable<'s>(&'s mut self) -> Readable<'s, 'l, F>

Notable traits for Readable<'s, 'l, F>

impl<'s, 'l, F: AsRawFd> Future for Readable<'s, 'l, F> type Output = ();
[src]

A future that resolves once the object becomes ready for reading

pub fn writable<'s>(&'s mut self) -> Writable<'s, 'l, F>

Notable traits for Writable<'s, 'l, F>

impl<'s, 'l, F: AsRawFd> Future for Writable<'s, 'l, F> type Output = ();
[src]

A future that resolves once the object becomes ready for writing

pub fn into_inner(mut self: Self) -> F[src]

Remove the async adapter and retrieve the underlying object

Trait Implementations

impl<'l, F: AsRawFd + Read> AsyncRead for Async<'l, F>[src]

impl<'l, F: AsRawFd + Write> AsyncWrite for Async<'l, F>[src]

impl<'l, F: AsRawFd> Drop for Async<'l, F>[src]

impl<'l, F: AsRawFd> Unpin for Async<'l, F>[src]

Auto Trait Implementations

impl<'l, F> !RefUnwindSafe for Async<'l, F>[src]

impl<'l, F> !Send for Async<'l, F>[src]

impl<'l, F> !Sync for Async<'l, F>[src]

impl<'l, F> !UnwindSafe for Async<'l, F>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<R> AsyncReadExt for R where
    R: AsyncRead + ?Sized
[src]

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.