dope-sys 0.39.0

Typed operating-system call contracts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::io::reactor::complete;

/// Preserves native fields while mapping the affine selected-buffer owner.
pub trait Map: complete::Map {
    type Parts: Copy;
    type Fault;

    fn new<B>(parts: Self::Parts, buffer: Selection<B, Self::Fault>) -> Self::Entry<B>;
    fn into_parts<B>(entry: Self::Entry<B>) -> (Self::Parts, Selection<B, Self::Fault>);
}

/// A selected owner or the exact fault that prevented selecting it.
pub enum Selection<B, E> {
    None,
    Selected(B),
    Invalid(E),
}