[−][src]Struct agilulf_protocol::AsyncWriteBuffer
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,
T: Send,
impl<T> Unpin for AsyncWriteBuffer<T>
impl<T> Sync for AsyncWriteBuffer<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for AsyncWriteBuffer<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for AsyncWriteBuffer<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,