pub trait DriverOps: 'static {
type Token: BackendToken;
type ProvidedRing: ProvidedRingOps + 'static;
type IoRequest<O: Unpin + 'static>: Future<Output = (Result<u32>, u32, O)> + Unpin + 'static;
// Required methods
fn buf_group(&self) -> u16;
fn provided_ring(&mut self) -> &mut Self::ProvidedRing;
fn arm_accept_multi(&mut self, token: Self::Token, fd: Fd) -> bool;
fn arm_recv_multi(
&mut self,
token: Self::Token,
fd: FixedFd,
buf_group: u16,
) -> bool;
unsafe fn arm_recv_msg_multi(
&mut self,
token: Self::Token,
fd: FixedFd,
buf_group: u16,
msghdr: *const msghdr,
) -> bool;
fn submit_send_tagged(
&mut self,
token: Self::Token,
fd: FixedFd,
ptr: *const u8,
len: u32,
) -> bool;
unsafe fn submit_send_msg_tagged(
&mut self,
token: Self::Token,
fd: FixedFd,
msg: *const msghdr,
) -> bool;
fn cancel_recv(&mut self, token: Self::Token);
fn try_submit_connect_raw(
&mut self,
fd: Fd,
addr: SockAddr,
) -> Result<Self::IoRequest<SockAddr>, (Error, SockAddr)>;
fn try_submit_sendmsg_raw<P: SendMsgPacket + Unpin + 'static>(
&mut self,
fd: Fd,
packet: P,
) -> Result<Self::IoRequest<P>, (Error, P)>;
fn try_submit_send_raw<B: AsRef<[u8]> + Unpin + 'static>(
&mut self,
fd: Fd,
buf: B,
) -> Result<Self::IoRequest<B>, (Error, B)>;
}Required Associated Types§
type Token: BackendToken
type ProvidedRing: ProvidedRingOps + 'static
type IoRequest<O: Unpin + 'static>: Future<Output = (Result<u32>, u32, O)> + Unpin + 'static
Required Methods§
fn buf_group(&self) -> u16
fn provided_ring(&mut self) -> &mut Self::ProvidedRing
fn arm_accept_multi(&mut self, token: Self::Token, fd: Fd) -> bool
fn arm_recv_multi( &mut self, token: Self::Token, fd: FixedFd, buf_group: u16, ) -> bool
Sourceunsafe fn arm_recv_msg_multi(
&mut self,
token: Self::Token,
fd: FixedFd,
buf_group: u16,
msghdr: *const msghdr,
) -> bool
unsafe fn arm_recv_msg_multi( &mut self, token: Self::Token, fd: FixedFd, buf_group: u16, msghdr: *const msghdr, ) -> bool
§Safety
msghdr must remain valid until the multishot recv is cancelled.
fn submit_send_tagged( &mut self, token: Self::Token, fd: FixedFd, ptr: *const u8, len: u32, ) -> bool
Sourceunsafe fn submit_send_msg_tagged(
&mut self,
token: Self::Token,
fd: FixedFd,
msg: *const msghdr,
) -> bool
unsafe fn submit_send_msg_tagged( &mut self, token: Self::Token, fd: FixedFd, msg: *const msghdr, ) -> bool
§Safety
msg must remain valid until the submission completes.
fn cancel_recv(&mut self, token: Self::Token)
fn try_submit_connect_raw( &mut self, fd: Fd, addr: SockAddr, ) -> Result<Self::IoRequest<SockAddr>, (Error, SockAddr)>
fn try_submit_sendmsg_raw<P: SendMsgPacket + Unpin + 'static>( &mut self, fd: Fd, packet: P, ) -> Result<Self::IoRequest<P>, (Error, P)>
fn try_submit_send_raw<B: AsRef<[u8]> + Unpin + 'static>( &mut self, fd: Fd, buf: B, ) -> Result<Self::IoRequest<B>, (Error, B)>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.