pub trait IsolationHelper: Sized {
    // Required methods
    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§

source

fn compatible_same_type(&self, other: &Self) -> bool

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.)

source

fn join_same_type(&self, other: &Self) -> Option<Self>

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

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<A> IsolationHelper for (A,)
where A: IsolationHelper,

source§

fn compatible_same_type(&self, other: &(A,)) -> bool

source§

fn join_same_type(&self, other: &(A,)) -> Option<(A,)>

source§

impl<A, B> IsolationHelper for (A, B)

source§

impl<A, B, C> IsolationHelper for (A, B, C)

source§

impl<A, B, C, D> IsolationHelper for (A, B, C, D)

source§

impl<A, B, C, D, E> IsolationHelper for (A, B, C, D, E)

source§

impl<A, B, C, D, E, F> IsolationHelper for (A, B, C, D, E, F)

source§

impl<A, B, C, D, E, F, G> IsolationHelper for (A, B, C, D, E, F, G)

source§

impl<A, B, C, D, E, F, G, H> IsolationHelper for (A, B, C, D, E, F, G, H)

source§

impl<A, B, C, D, E, F, G, H, I> IsolationHelper for (A, B, C, D, E, F, G, H, I)

source§

impl<A, B, C, D, E, F, G, H, I, J> IsolationHelper for (A, B, C, D, E, F, G, H, I, J)

source§

impl<A, B, C, D, E, F, G, H, I, J, K> IsolationHelper for (A, B, C, D, E, F, G, H, I, J, K)

source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> IsolationHelper for (A, B, C, D, E, F, G, H, I, J, K, L)

Implementors§