dope_sys/engine/admit/
guard.rs1use crate::{
2 engine::admit::Context,
3 io::{request, socket},
4};
5
6type Slot<C> = <<C as Context>::Inputs as request::Context>::Target;
7
8pub trait Guard<C: Context>: Sized {
10 fn socket(
11 self,
12 slot: <C::Inputs as request::Context>::Outbound,
13 domain: socket::Domain,
14 key: C::Key,
15 );
16 fn accept_multi(self, listener: Slot<C>, key: C::Key);
17 fn recv(self, slot: Slot<C>, key: C::Key);
18 fn recv_msg(self, fd: &<C::Inputs as request::Context>::Datagram<'_>, key: C::Key);
19 fn shutdown(self, slot: Slot<C>, key: C::Key);
20}