Deps

Trait Deps 

pub trait Deps: DynSync {
    const DEP_KIND_NULL: DepKind;
    const DEP_KIND_RED: DepKind;
    const DEP_KIND_SIDE_EFFECT: DepKind;
    const DEP_KIND_ANON_ZERO_DEPS: DepKind;
    const DEP_KIND_MAX: u16;

    // Required methods
    fn with_deps<OP, R>(deps: TaskDepsRef<'_>, op: OP) -> R
       where OP: FnOnce() -> R;
    fn read_deps<OP>(op: OP)
       where OP: for<'a> FnOnce(TaskDepsRef<'a>);
    fn name(&self, dep_kind: DepKind) -> &'static str;
}

Required Associated Constants§

const DEP_KIND_NULL: DepKind

We use this for most things when incr. comp. is turned off.

const DEP_KIND_RED: DepKind

We use this to create a forever-red node.

const DEP_KIND_SIDE_EFFECT: DepKind

We use this to create a side effect node.

const DEP_KIND_ANON_ZERO_DEPS: DepKind

We use this to create the anon node with zero dependencies.

const DEP_KIND_MAX: u16

This is the highest value a DepKind can have. It’s used during encoding to pack information into the unused bits.

Required Methods§

fn with_deps<OP, R>(deps: TaskDepsRef<'_>, op: OP) -> R
where OP: FnOnce() -> R,

Execute the operation with provided dependencies.

fn read_deps<OP>(op: OP)
where OP: for<'a> FnOnce(TaskDepsRef<'a>),

Access dependencies from current implicit context.

fn name(&self, dep_kind: DepKind) -> &'static str

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Deps for DepsType

Source§

const DEP_KIND_NULL: DepKind = dep_kinds::Null

Source§

const DEP_KIND_RED: DepKind = dep_kinds::Red

Source§

const DEP_KIND_SIDE_EFFECT: DepKind = dep_kinds::SideEffect

Source§

const DEP_KIND_ANON_ZERO_DEPS: DepKind = dep_kinds::AnonZeroDeps

Source§

const DEP_KIND_MAX: u16 = 324u16