[][src]Struct async_protocol::AsyncSendConnection

pub struct AsyncSendConnection<P: Parcel, S: AsyncWrite + Send + Unpin> {
    pub writer: WriteHalf<S>,
    pub transport: Simple,
    pub middleware: Default,
    pub settings: Settings,
    pub _parcel: PhantomData<P>,
}

A stream-based connection.

Fields

writer: WriteHalf<S>transport: Simplemiddleware: Defaultsettings: Settings_parcel: PhantomData<P>

Implementations

impl<P, S> SendConnection<P, S> where
    P: Parcel,
    S: AsyncWrite + Send + Unpin
[src]

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

Creates a new connection.

pub async fn send_packet(&mut self, packet: &P) -> Result<(), Error>[src]

Sends a packet.

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

Trait Implementations

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

Auto Trait Implementations

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

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

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

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

impl<P, S> !UnwindSafe for SendConnection<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.