dope-sys 0.20.0

Typed operating-system call contracts
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::memory;

/// An unbound construction result can acquire its payload owner exactly once.
pub trait Build<P>: Sized {
    type Context;
    type Cleanup: memory::Cleanup<P>;

    fn close(self, context: Self::Context) -> Result<P, Self::Cleanup>;
    fn into_result(self) -> Result<P, Self::Cleanup>;
}