Value

Trait Value 

Source
pub trait Value: Default {
    // Required method
    fn finished(&self) -> bool;
}
Expand description

A value for a state hash table.

Required Methods§

Source

fn finished(&self) -> bool

True iff the value is at a quiescent/finished state. This means it can be collected, not that it will be collected. It is perfectly acceptable to pickup a handle to finished state and take a transition that leads to it being unfinished. Consequently, finished should be evaluated under mutual exclusion. The way we do this is to hold a lock, check that we hold the only deferenceable copy (there’s another in the map, but the lock prevents anyone else from accessing the map because it’s the map’s lock that we hold). Consequently, this should be a fast computation.

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§