Skip to main content

Driver

Struct Driver 

Source
pub struct Driver { /* private fields */ }

Implementations§

Source§

impl Driver

Source

pub fn has_pending(&mut self) -> bool

Source

pub fn has_completion(&mut self) -> bool

Source

pub fn park(&mut self) -> Result<()>

Source

pub fn park_for(&mut self, duration: Duration) -> Result<()>

Source§

impl Driver

Source

pub fn drive(&mut self) -> Result<bool>

Source

pub fn drive_with<H: CqeRouter>(&mut self, handler: &mut H) -> Result<bool>

Source

pub fn cancel_write(&mut self, token: Token)

Source

pub fn cancel_accept(&mut self, token: Token)

Source

pub fn dispatch_cqes<H: CqeRouter>(&mut self, handler: &mut H)

Source§

impl Driver

Source

pub fn submit_only(&mut self) -> Result<()>

Source§

impl Driver

Source

pub fn try_submit_sendmsg_raw_boxed<P>( &mut self, fd: Fd, packet: Box<P>, ) -> Result<Request<P>, (Error, Box<P>)>
where P: SendMsgPacket + Unpin + 'static,

Trait Implementations§

Source§

impl DriverLifecycle for Driver

Source§

fn drive(&mut self) -> Result<bool>

Source§

fn has_pending(&mut self) -> bool

Source§

fn park(&mut self) -> Result<()>

Source§

fn park_for(&mut self, duration: Duration) -> Result<()>

Source§

fn submit_only(&mut self) -> Result<()>

Source§

fn arm_with_retry<F>(&mut self, op: F) -> bool
where F: FnMut(&mut Self) -> bool,

Source§

impl DriverOps for Driver

Source§

type Token = Token<u8>

Source§

type ProvidedRing = ProvidedRing

Source§

type IoRequest<O: Unpin + 'static> = Request<O>

Source§

fn provided_ring(&mut self) -> &mut Self::ProvidedRing

Source§

fn buf_group(&self) -> u16

Source§

fn arm_recv_multi( &mut self, token: Self::Token, fd: FixedFd, buf_group: u16, ) -> bool

Source§

unsafe fn arm_recv_msg_multi( &mut self, token: Self::Token, fd: FixedFd, buf_group: u16, msghdr: *const msghdr, ) -> bool

Safety Read more
Source§

fn arm_accept_multi(&mut self, token: Self::Token, fd: Fd) -> bool

Source§

fn submit_send_tagged( &mut self, token: Self::Token, fd: FixedFd, ptr: *const u8, len: u32, ) -> bool

Source§

unsafe fn submit_send_msg_tagged( &mut self, token: Self::Token, fd: FixedFd, msg: *const msghdr, ) -> bool

Safety Read more
Source§

fn cancel_recv(&mut self, token: Self::Token)

Source§

fn try_submit_connect_raw( &mut self, fd: Fd, addr: SockAddr, ) -> Result<Self::IoRequest<SockAddr>, (Error, SockAddr)>

Source§

fn try_submit_sendmsg_raw<P: SendMsgPacket + Unpin + 'static>( &mut self, fd: Fd, packet: P, ) -> Result<Self::IoRequest<P>, (Error, P)>

Source§

fn try_submit_send_raw<B: AsRef<[u8]> + Unpin + 'static>( &mut self, fd: Fd, buf: B, ) -> Result<Self::IoRequest<B>, (Error, B)>

Source§

impl Drop for Driver

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl FixedBuffers for Driver

Source§

type Guard = FixedBufGuard

Source§

fn fixed_guard(&mut self) -> Option<Self::Guard>

Source§

fn register_fixed(&mut self, fd: Fd) -> Result<Option<u32>>

Source§

fn unregister_fixed(&mut self, idx: u32)

Source§

impl ProvidedBufRing for Driver

Source§

type Provided = ProvidedBuf

Source§

fn provided_group(&mut self) -> Option<(u16, u32)>

Source§

fn provided(&mut self, bid: u16, len: usize) -> Option<Self::Provided>

Source§

impl SubmitOps for &mut Driver

Source§

fn submit_accept( self, fd: Fd, ) -> impl Future<Output = Result<(RawFd, SockAddr)>> + 'static

Source§

fn submit_read<B>( self, fd: Fd, buf: B, ) -> impl Future<Output = (Result<u32>, B)> + 'static
where B: AsMut<[u8]> + Unpin + 'static,

Source§

fn submit_send_raw<B>( self, fd: Fd, buf: B, len: usize, ) -> impl Future<Output = (Result<u32>, B)> + 'static
where B: AsRef<[u8]> + Unpin + 'static,

Source§

fn submit_sendmsg_raw<P>( self, fd: Fd, packet: P, ) -> impl Future<Output = (Result<u32>, P)> + 'static
where P: SendMsgPacket + Unpin + 'static,

Source§

fn submit_recvmsg_raw<P>( self, fd: Fd, packet: P, ) -> impl Future<Output = (Result<u32>, P)> + 'static
where P: RecvMsgPacket + Unpin + 'static,

Auto Trait Implementations§

§

impl !RefUnwindSafe for Driver

§

impl !Send for Driver

§

impl !Sync for Driver

§

impl !UnwindSafe for Driver

§

impl Freeze for Driver

§

impl Unpin for Driver

§

impl UnsafeUnpin for Driver

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more