[−][src]Struct turbulence::channel_builder::ChannelBuilder
Helper that allows for easily opening different channel types on a PacketMultiplexer
.
Contains a MuxPacketPool
and a Runtime
implemenentation that is used for each created
channel.
Fields
runtime: R
pool: MuxPacketPool<P>
Implementations
impl<R, P> ChannelBuilder<R, P> where
R: Runtime + 'static,
P: PacketPool + Clone + Send + 'static,
P::Packet: Unpin + Send,
[src]
R: Runtime + 'static,
P: PacketPool + Clone + Send + 'static,
P::Packet: Unpin + Send,
pub fn new(runtime: R, pool: P) -> Self
[src]
pub fn open_unreliable_channel(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableChannel<MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableChannel<MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
pub fn open_unreliable_bincode_channel(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableBincodeChannel<MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableBincodeChannel<MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
pub fn open_unreliable_typed_channel<M>(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableTypedChannel<M, MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize
) -> Result<(UnreliableTypedChannel<M, MuxPacketPool<P>>, ChannelStatistics), DuplicateChannel>
pub fn open_reliable_channel(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
settings: Settings
) -> Result<(ReliableChannel, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
settings: Settings
) -> Result<(ReliableChannel, ChannelStatistics), DuplicateChannel>
pub fn open_reliable_bincode_channel(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_message_len: usize
) -> Result<(ReliableBincodeChannel, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_message_len: usize
) -> Result<(ReliableBincodeChannel, ChannelStatistics), DuplicateChannel>
pub fn open_reliable_typed_channel<M>(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_message_len: usize
) -> Result<(ReliableTypedChannel<M>, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_message_len: usize
) -> Result<(ReliableTypedChannel<M>, ChannelStatistics), DuplicateChannel>
pub fn open_compressed_typed_channel<M>(
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_chunk_len: usize
) -> Result<(CompressedTypedChannel<M>, ChannelStatistics), DuplicateChannel>
[src]
&mut self,
multiplexer: &mut PacketMultiplexer<P::Packet>,
channel: PacketChannel,
buffer_size: usize,
reliability_settings: Settings,
max_chunk_len: usize
) -> Result<(CompressedTypedChannel<M>, ChannelStatistics), DuplicateChannel>
Auto Trait Implementations
impl<R, P> RefUnwindSafe for ChannelBuilder<R, P> where
P: RefUnwindSafe,
R: RefUnwindSafe,
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, P> Send for ChannelBuilder<R, P> where
P: Send,
R: Send,
P: Send,
R: Send,
impl<R, P> Sync for ChannelBuilder<R, P> where
P: Sync,
R: Sync,
P: Sync,
R: Sync,
impl<R, P> Unpin for ChannelBuilder<R, P> where
P: Unpin,
R: Unpin,
P: Unpin,
R: Unpin,
impl<R, P> UnwindSafe for ChannelBuilder<R, P> where
P: UnwindSafe,
R: UnwindSafe,
P: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,