pub struct UringEngine { /* private fields */ }Expand description
io_uring-backed Engine.
Implementations§
Source§impl UringEngine
impl UringEngine
Trait Implementations§
Source§impl Engine for UringEngine
impl Engine for UringEngine
Source§fn add_listener(&mut self, fd: RawFd, token: Token) -> Result<()>
fn add_listener(&mut self, fd: RawFd, token: Token) -> Result<()>
Registers a nonblocking listening socket for accept readiness. Read more
Source§fn add_stream(&mut self, _fd: RawFd, _token: Token) -> Result<()>
fn add_stream(&mut self, _fd: RawFd, _token: Token) -> Result<()>
Registers a connected socket for read/write readiness. Read more
Source§fn write(
&mut self,
token: Token,
fd: RawFd,
slot: u32,
len: usize,
offset: usize,
) -> Result<Poll>
fn write( &mut self, token: Token, fd: RawFd, slot: u32, len: usize, offset: usize, ) -> Result<Poll>
Queues a write of
slot[0..len], resuming from a prior partial write
when the backend tracks one for this token. Read moreSource§fn connect(&mut self, token: Token, addr: SocketAddr) -> Result<(RawFd, Poll)>
fn connect(&mut self, token: Token, addr: SocketAddr) -> Result<(RawFd, Poll)>
Starts a nonblocking
connect(2); completion is a CQE where
result == Ok(0) means established. Read moreSource§fn accept(
&mut self,
_lfd: RawFd,
ltoken: Token,
) -> Result<Option<(RawFd, SocketAddr)>>
fn accept( &mut self, _lfd: RawFd, ltoken: Token, ) -> Result<Option<(RawFd, SocketAddr)>>
Attempts an accept on a registered listener;
Ok(Some(..)) completes
inline, Ok(None) waits for a CQE on the listener token. Read moreSource§fn splice_pump(&mut self, a: Token, afd: i32, b: Token, bfd: i32) -> Result<()>
fn splice_pump(&mut self, a: Token, afd: i32, b: Token, bfd: i32) -> Result<()>
Starts a bidirectional zero-copy splice pump between two registered
streams (
IO-04). Completions on either token report bytes moved;
Ok(0) signals EOF for that direction. Read moreSource§fn poll(&mut self, timeout: Option<Duration>, out: &mut Vec<Cqe>) -> Result<()>
fn poll(&mut self, timeout: Option<Duration>, out: &mut Vec<Cqe>) -> Result<()>
Drives the backend, filling
out with completions. Blocks up to
timeout (or indefinitely when None). Read moreSource§fn take_accepted(&mut self, fd: RawFd) -> Option<SocketAddr>
fn take_accepted(&mut self, fd: RawFd) -> Option<SocketAddr>
Pops addresses of accepted connections reported by accept CQEs.
impl Send for UringEngine
Auto Trait Implementations§
impl !Sync for UringEngine
impl Freeze for UringEngine
impl RefUnwindSafe for UringEngine
impl Unpin for UringEngine
impl UnsafeUnpin for UringEngine
impl UnwindSafe for UringEngine
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