Struct mpstthree::meshedchannels::MeshedChannels[][src]

pub struct MeshedChannels<S1, S2, R, N> where
    S1: Session,
    S2: Session,
    R: Role,
    N: Role
{ pub session1: S1, pub session2: S2, pub stack: R, pub name: N, }
Expand description

The structure which encapsulates two binary session types, a stack and a name.

Example

use mpstthree::binary::struct_trait::{End, Recv, Send, Session};

use mpstthree::meshedchannels::MeshedChannels;

use mpstthree::role::a::RoleA;
use mpstthree::role::b::RoleB;
use mpstthree::role::c::RoleC;
use mpstthree::role::end::RoleEnd;

// Creating the binary sessions
type AtoB<N> = Send<N, End>;
type AtoC<N> = Recv<N, End>;

// Stacks
type StackA = RoleB<RoleC<RoleEnd>>;

// Creating the MP sessions
type EndpointA<N> = MeshedChannels<AtoB<N>, AtoC<N>, StackA, RoleA<RoleEnd>>;

Fields

session1: S1session2: S2stack: Rname: N

Implementations

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.