[][src]Struct async_protocol::AsyncReceiveConnection

pub struct AsyncReceiveConnection<P: Parcel, S: AsyncRead + Send + Unpin> {
    pub reader: ReadHalf<S>,
    pub transport: Simple,
    pub middleware: Default,
    pub settings: Settings,
    pub _parcel: PhantomData<P>,
}

A stream-based connection.

Fields

reader: ReadHalf<S>transport: Simplemiddleware: Defaultsettings: Settings_parcel: PhantomData<P>

Implementations

impl<P, S> ReceiveConnection<P, S> where
    P: Parcel,
    S: AsyncRead + Send + Unpin
[src]

pub fn new(reader: ReadHalf<S>, settings: Settings) -> Self[src]

Creates a new connection.

pub async fn receive_packet(&mut self) -> Result<Option<P>, Error>[src]

Attempts to receive a packet.

pub fn into_inner(self) -> ReadHalf<S>[src]

Trait Implementations

impl<P: Debug + Parcel, S: Debug + AsyncRead + Send + Unpin> Debug for ReceiveConnection<P, S>[src]

Auto Trait Implementations

impl<P, S> !RefUnwindSafe for ReceiveConnection<P, S>[src]

impl<P, S> Send for ReceiveConnection<P, S> where
    P: Send
[src]

impl<P, S> Sync for ReceiveConnection<P, S> where
    P: Sync,
    S: Sync
[src]

impl<P, S> Unpin for ReceiveConnection<P, S> where
    P: Unpin
[src]

impl<P, S> !UnwindSafe for ReceiveConnection<P, S>[src]

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.