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> IsolationHelper for (A,)

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§