Skip to main content

DriverContext

Struct DriverContext 

Source
pub struct DriverContext<'a, 'd> { /* private fields */ }

Implementations§

Source§

impl<'a, 'd> DriverContext<'a, 'd>

Source

pub fn reborrow(&mut self) -> DriverContext<'_, 'd>

Source

pub fn driver_ref(&self) -> DriverRef<'d>

Source

pub fn turn_now(&self) -> Instant

Returns the monotonic-clock snapshot for the current driver turn.

Source

pub fn guard(&mut self, fd: Fd<'d>) -> FdGuard<'_, 'd>

Source

pub unsafe fn guard_raw(&mut self, slot: FdSlot) -> FdGuard<'_, 'd>

§Safety

slot must be reserved from this access and uniquely owned.

Trait Implementations§

Source§

impl<'a, 'd> Bootstrap<'d> for DriverContext<'a, 'd>

Source§

fn bind_listener_slot( &mut self, addr: SocketAddr, backlog: i32, config: &ListenerConfig, ) -> Result<(Fd<'d>, SocketAddr)>

Source§

fn bind_datagram_slot( &mut self, addr: SocketAddr, ) -> Result<(Fd<'d>, SocketAddr)>

Source§

impl Completion for DriverContext<'_, '_>

Source§

fn drain(&mut self, buf: &mut [Cqe]) -> usize

Source§

fn wait(&mut self, timeout: Option<Duration>) -> Result<()>

Source§

impl ContextControl for DriverContext<'_, '_>

Source§

unsafe fn register_shutdown_fd(&mut self, fd: BorrowedFd<'_>) -> Result<()>

§Safety

fd must remain open through this call.

Source§

fn prepare_drop(&mut self)

Source§

fn reserve_outbound(&mut self, count: u32) -> Result<OutboundReservation>

Source§

fn reserve_route(&mut self, id: u8) -> bool

Source§

fn release_route(&mut self, id: u8)

Source§

fn poison_route(&mut self, id: u8)

Source§

fn quiesce(&mut self, targets: &[Token]) -> bool

Source§

fn set( &mut self, fixed_idx: u32, level: u32, optname: u32, value: i32, ) -> Result<(), PushError>

Source§

impl ProvidedBuffers for DriverContext<'_, '_>

Source§

fn buffer_group(&self) -> u16

Source§

fn buffer_len(&self) -> usize

Source§

unsafe fn release(&mut self, bid: u16)

Safety Read more
Source§

unsafe fn buffer_ptr_len(&mut self, len: u32, bid: u16) -> (NonNull<u8>, usize)

Safety Read more
Source§

impl Submission for DriverContext<'_, '_>

Source§

fn push(&mut self, sqe: Sqe) -> Result<(), PushError>

Source§

fn flush_submissions(&mut self) -> bool

Auto Trait Implementations§

§

impl<'a, 'd> !RefUnwindSafe for DriverContext<'a, 'd>

§

impl<'a, 'd> !Send for DriverContext<'a, 'd>

§

impl<'a, 'd> !Sync for DriverContext<'a, 'd>

§

impl<'a, 'd> !UnwindSafe for DriverContext<'a, 'd>

§

impl<'a, 'd> Freeze for DriverContext<'a, 'd>

§

impl<'a, 'd> Unpin for DriverContext<'a, 'd>

§

impl<'a, 'd> UnsafeUnpin for DriverContext<'a, 'd>

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, 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.