[][src]Struct agilulf_protocol::AsyncWriteBuffer

pub struct AsyncWriteBuffer<T: AsyncWrite + Unpin> {
    pub stream: T,
}

Actually this struct doesn't have any buffer. It's only a wrapper for AsyncWrite

It's only used for implementing methods on stream.

Fields

stream: T

Methods

impl<T: AsyncWrite + Unpin> AsyncWriteBuffer<T>[src]

pub fn new(stream: T) -> AsyncWriteBuffer<T>[src]

pub async fn write_all<'_>(&'_ mut self, data: Vec<u8>) -> Result<()>[src]

impl<T: AsyncWrite + Unpin + 'static> AsyncWriteBuffer<T>[src]

pub fn into_reply_sink(self) -> impl Sink<Reply, Error = ProtocolError>[src]

Convert a AsyncWriteBuffer into Sink<Reply, Error = ProtocolError>.

Note: Actually ProtocolError should be returned to client. So convert the ProtocolError into Reply before sending them into this Sink.

Auto Trait Implementations

impl<T> Send for AsyncWriteBuffer<T> where
    T: Send

impl<T> Unpin for AsyncWriteBuffer<T>

impl<T> Sync for AsyncWriteBuffer<T> where
    T: Sync

impl<T> UnwindSafe for AsyncWriteBuffer<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for AsyncWriteBuffer<T> where
    T: RefUnwindSafe

Blanket Implementations

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.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,