dope-sys 0.30.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 std::os::fd;

use crate::probe::{
    Stopped,
    session::{Direct, Failure, Occupied, Session},
};

pub trait Empty: Session {
    type Install;
    type Direct: Direct<Empty = Self>;
    type Occupied: Occupied<Empty = Self>;

    fn create(self, probe: Self::Probe) -> Result<Self::Direct, Stopped<Self, Failure<Self>>>;
    fn install(
        self,
        file: fd::BorrowedFd<'_>,
    ) -> Result<Self::Occupied, Stopped<Self, Self::Install>>;
}