[−][src]Struct ringbahn::Ring
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]
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]
fn poll_fill_buf(self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Result<&[u8]>>
[src]
fn consume(self: Pin<&mut Self>, amt: usize)
[src]
impl<IO: Read + AsRawFd, D: Drive> AsyncRead for Ring<IO, D>
[src]
fn poll_read(
self: Pin<&mut Self>,
ctx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
ctx: &mut Context,
buf: &mut [u8]
) -> Poll<Result<usize>>
fn poll_read_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &mut [IoSliceMut]
) -> Poll<Result<usize, Error>>
impl<IO: Write + AsRawFd, D: Drive> AsyncWrite for Ring<IO, D>
[src]
fn poll_write(
self: Pin<&mut Self>,
ctx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
[src]
self: Pin<&mut Self>,
ctx: &mut Context,
buf: &[u8]
) -> Poll<Result<usize>>
fn poll_flush(self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Result<()>>
[src]
fn poll_close(self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Result<()>>
[src]
fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
[src]
self: Pin<&mut Self>,
cx: &mut Context,
bufs: &[IoSlice]
) -> Poll<Result<usize, Error>>
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,
D: Send,
IO: Send,
impl<IO, D> Sync for Ring<IO, D> where
D: Sync,
IO: Sync,
D: Sync,
IO: Sync,
impl<IO, D> Unpin for Ring<IO, D> where
D: Unpin,
IO: Unpin,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,