dope-sys 0.24.0

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 crate::table::token::{Context, Tuning};

pub enum Control<T> {
    Shutdown,
    Tuning(T),
    ClosePrep,
    Unknown,
}

/// A validated framework identity retaining its original diagnostic value.
pub trait Decode: Copy {
    type Context: Context;
    type Tuning: Tuning<Slot = <Self::Context as Context>::Slot>;

    fn from_raw(raw: u64) -> Result<Self, u64>;
    fn decode(self) -> Control<Self::Tuning>;
    fn control(self) -> <Self::Context as Context>::Control;
}