pub trait IsolationHelper: Sized {
    fn compatible_same_type(&self, other: &Self) -> bool;
    fn join_same_type(&self, other: &Self) -> Option<Self>;
}
Expand description

Trait to help implement Isolation.

You should generally implement this trait whenever you need to implement a new set of stream isolation rules: it takes care of down-casting and type checking for you.

When you implement this trait for some type T, isolation objects of that type will be incompatible (unable to share circuits) with objects of any other type. (That’s usually what you want; if you’re defining a new type of Isolation rules, then you probably don’t want streams using different rules to share circuits with yours.)

Required Methods

Returns whether self and other are compatible.

Two streams may share a circuit if and only if they have compatible Isolations.

(See Isolation::compatible for more information and requirements.)

Join self and other into the intersection of what they allows.

(See Isolation::join for more information and requirements.)

Implementations on Foreign Types

Implementors