dope-sys 0.76.0

Typed operating-system call contracts
Documentation
use crate::{
    engine::admit::Context,
    io::{request, socket},
};

type Slot<C> = <<C as Context>::Inputs as request::Context>::Target;

/// A reserved native submission slot, consumed before the host commits its flight.
pub trait Guard<C: Context>: Sized {
    fn socket(
        self,
        slot: <C::Inputs as request::Context>::Outbound,
        domain: socket::Domain,
        key: C::Key,
    );
    fn accept_multi(self, listener: Slot<C>, key: C::Key);
    fn recv(self, slot: Slot<C>, key: C::Key);
    fn recv_msg(self, fd: &<C::Inputs as request::Context>::Datagram<'_>, key: C::Key);
    fn shutdown(self, slot: Slot<C>, key: C::Key);
}