[][src]Struct turbulence::message_channels::MessageChannelsBuilder

pub struct MessageChannelsBuilder<R, P> where
    R: Runtime,
    P: PacketPool
{ /* fields omitted */ }

Methods

impl<R, P> MessageChannelsBuilder<R, P> where
    R: Runtime,
    P: PacketPool
[src]

pub fn new(runtime: R, pool: P) -> Self[src]

impl<R, P> MessageChannelsBuilder<R, P> where
    R: Runtime + 'static,
    P: PacketPool + Clone + Send + 'static,
    P::Packet: Unpin + Send
[src]

pub fn register<M: ChannelMessage>(
    &mut self,
    settings: MessageChannelSettings
) -> Result<(), ChannelAlreadyRegistered>
[src]

Register this message type on the constructed MessageChannels, using the given channel settings.

Can only be called once per message type, will error if it is called with the same message type more than once.

pub fn build(
    self,
    multiplexer: &mut PacketMultiplexer<P::Packet>
) -> MessageChannels
[src]

Build a MessageChannels instance that can send and receive all of the registered message types via channels on the given packet multiplexer.

Auto Trait Implementations

impl<R, P> RefUnwindSafe for MessageChannelsBuilder<R, P> where
    P: RefUnwindSafe,
    R: RefUnwindSafe

impl<R, P> Send for MessageChannelsBuilder<R, P> where
    P: Send

impl<R, P> Sync for MessageChannelsBuilder<R, P> where
    P: Sync

impl<R, P> Unpin for MessageChannelsBuilder<R, P> where
    P: Unpin,
    R: Unpin

impl<R, P> UnwindSafe for MessageChannelsBuilder<R, P> where
    P: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.