[][src]Struct turbulence::channel_builder::ChannelBuilder

pub struct ChannelBuilder<R, P> {
    pub runtime: R,
    pub pool: MuxPacketPool<P>,
}

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: Rpool: MuxPacketPool<P>

Implementations

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

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]

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]

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]

pub fn open_reliable_channel(
    &mut self,
    multiplexer: &mut PacketMultiplexer<P::Packet>,
    channel: PacketChannel,
    buffer_size: usize,
    settings: Settings
) -> Result<(ReliableChannel, ChannelStatistics), DuplicateChannel>
[src]

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]

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]

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]

Auto Trait Implementations

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

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

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

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

impl<R, P> UnwindSafe for ChannelBuilder<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.