Skip to main content

dope_sys/io/request/
lower.rs

1use o3::buffer::bytes::{self, bounded};
2
3use crate::io::request;
4
5/// Native requests whose input borrows are consumed during lowering.
6pub trait Lower: Sized {
7    type Target;
8    type Outbound;
9    type Domain;
10    type Datagram;
11    type Borrowed<'a>: request::Borrow<'a, Target = Self::Target, Buffer = bytes::Prefix<'a, { bounded::MAX }>>
12    where
13        Self: 'a;
14
15    fn socket(slot: Self::Outbound, domain: Self::Domain) -> Self;
16    fn accept_multi(listener: Self::Target) -> Self;
17    fn recv<const GROUP: u16>(slot: Self::Target) -> Self;
18    fn recv_msg<const GROUP: u16>(datagram: Self::Datagram) -> Self;
19    fn shutdown(slot: Self::Target) -> Self;
20}