pub struct MessageChannelsBuilder<R, P> where
R: Runtime,
P: PacketPool, { /* private fields */ }
Implementations
sourceimpl<R, P> MessageChannelsBuilder<R, P> where
R: Runtime,
P: PacketPool,
impl<R, P> MessageChannelsBuilder<R, P> where
R: Runtime,
P: PacketPool,
sourceimpl<R, P> MessageChannelsBuilder<R, P> where
R: Runtime + 'static,
P: PacketPool + Clone + Send + 'static,
P::Packet: Unpin + Send,
impl<R, P> MessageChannelsBuilder<R, P> where
R: Runtime + 'static,
P: PacketPool + Clone + Send + 'static,
P::Packet: Unpin + Send,
sourcepub fn register<M: ChannelMessage>(
&mut self,
settings: MessageChannelSettings
) -> Result<(), ChannelAlreadyRegistered>
pub fn register<M: ChannelMessage>(
&mut self,
settings: MessageChannelSettings
) -> Result<(), ChannelAlreadyRegistered>
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.
sourcepub fn build(
self,
multiplexer: &mut PacketMultiplexer<P::Packet>
) -> MessageChannels
pub fn build(
self,
multiplexer: &mut PacketMultiplexer<P::Packet>
) -> MessageChannels
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,
impl<R, P> UnwindSafe for MessageChannelsBuilder<R, P> where
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more