[][src]Struct ringbahn::Ring

pub struct Ring<IO, D = DemoDriver<'static>> { /* fields omitted */ }

A wrapper that runs a handle's IO on io-uring.

Takes any object that implements AsRawFd and runs the IO for that object on io-uring, instead of using blocking interfaces. Ring implements AsyncRead, AsyncWrite, and AsyncBufRead.

Note that using AsyncBufRead interfaces instead of AsyncRead will likely be more performant, if possible.

Implementations

impl<IO: AsRawFd, D: Drive + Default> Ring<IO, D>[src]

pub fn new(io: IO) -> Ring<IO, D>[src]

Construct a new Ring on the default driver

impl<IO: AsRawFd, D: Drive> Ring<IO, D>[src]

pub fn on_driver(io: IO, driver: D) -> Ring<IO, D>[src]

Construct a new Ring on a driver of your choice

pub fn cancel(&mut self)[src]

Cancel interest in any ongoing IO.

Trait Implementations

impl<IO: Read + AsRawFd, D: Drive> AsyncBufRead for Ring<IO, D>[src]

impl<IO: Read + AsRawFd, D: Drive> AsyncRead for Ring<IO, D>[src]

impl<IO: Write + AsRawFd, D: Drive> AsyncWrite for Ring<IO, D>[src]

Auto Trait Implementations

impl<IO, D = DemoDriver<'static>> !RefUnwindSafe for Ring<IO, D>

impl<IO, D> Send for Ring<IO, D> where
    D: Send,
    IO: Send

impl<IO, D> Sync for Ring<IO, D> where
    D: Sync,
    IO: Sync

impl<IO, D> Unpin for Ring<IO, D> where
    D: Unpin,
    IO: Unpin

impl<IO, D = DemoDriver<'static>> !UnwindSafe for Ring<IO, D>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?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.