dope-sys 0.29.1

Typed operating-system call contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use libc::socklen_t;

use crate::{io, io::socket::addr};

/// Native requests retaining every input address through their borrow.
pub trait Borrow<'a>: Sized {
    type Target;
    type Buffer;

    fn send(slot: Self::Target, input: Self::Buffer) -> Self;
    fn send_msg<M: io::raw::Message<'a>>(slot: Self::Target, message: M) -> Self;
    fn accept(
        listener: Self::Target,
        address: &'a mut libc::sockaddr_storage,
        len: &'a mut socklen_t,
    ) -> Self;
    fn connect(slot: Self::Target, address: addr::Addr<'a>) -> Self;
}