[][src]Struct turbulence::unreliable_bincode_channel::UnreliableTypedChannel

pub struct UnreliableTypedChannel<T, P> where
    P: PacketPool
{ /* fields omitted */ }

Wrapper over an UnreliableBincodeChannel that only allows a single message type.

Methods

impl<T, P> UnreliableTypedChannel<T, P> where
    P: PacketPool
[src]

pub fn new(
    packet_pool: P,
    incoming: Receiver<P::Packet>,
    outgoing: Sender<P::Packet>
) -> Self
[src]

pub async fn flush<'_>(&'_ mut self) -> Result<(), SendError>[src]

impl<T, P> UnreliableTypedChannel<T, P> where
    T: Serialize,
    P: PacketPool
[src]

pub async fn send<'_, '_>(&'_ mut self, msg: &'_ T) -> Result<(), SendError>[src]

impl<'a, T, P> UnreliableTypedChannel<T, P> where
    T: Deserialize<'a>,
    P: PacketPool
[src]

pub async fn recv(&'a mut self) -> Result<T, RecvError>[src]

Auto Trait Implementations

impl<T, P> !RefUnwindSafe for UnreliableTypedChannel<T, P>

impl<T, P> Send for UnreliableTypedChannel<T, P> where
    P: Send,
    T: Send,
    <P as PacketPool>::Packet: Send

impl<T, P> Sync for UnreliableTypedChannel<T, P> where
    P: Sync,
    T: Sync,
    <P as PacketPool>::Packet: Send + Sync

impl<T, P> Unpin for UnreliableTypedChannel<T, P> where
    P: Unpin,
    T: Unpin,
    <P as PacketPool>::Packet: Unpin

impl<T, P> !UnwindSafe for UnreliableTypedChannel<T, P>

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.