pub trait LockEqualOrBefore<X> { }
Expand description

Marker trait that indicates that Self is X or an ancestor of X.

Functions and trait impls that want to apply lock ordering bounds should prefer LockBefore. However, there are some situations where using template to apply lock ordering bounds is impossible, so a fixed level must be used instead. In that case, LockEqualOrBefore can be used as a workaround to avoid restricting other methods to just the fixed level. See the tests for the example. Note: Any type representing a lock level must explicitly implement LockEqualOrBefore<X> for X (or use a lock_level macro) for this to work.

Implementors§