Struct CopyToBytes
struct CopyToBytes<S> { ... }
A helper that wraps a Sink<Bytes> and converts it into a
Sink<&'a [u8]> by copying each byte slice into an owned Bytes.
See the documentation for SinkWriter for an example.
Implementations
impl<S> CopyToBytes<S>
fn new(inner: S) -> SelfCreates a new
CopyToBytes.fn get_ref(self: &Self) -> &SGets a reference to the underlying sink.
fn get_mut(self: &mut Self) -> &mut SGets a mutable reference to the underlying sink.
fn into_inner(self: Self) -> SConsumes this
CopyToBytes, returning the underlying sink.
impl<'__pin, S> Unpin for CopyToBytes<S>
impl<'a, S> Sink for CopyToBytes<S>
fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn start_send(self: Pin<&mut Self>, item: &'a [u8]) -> Result<(), <Self as >::Error>fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
impl<S> Freeze for CopyToBytes<S>
impl<S> RefUnwindSafe for CopyToBytes<S>
impl<S> Send for CopyToBytes<S>
impl<S> Sync for CopyToBytes<S>
impl<S> UnsafeUnpin for CopyToBytes<S>
impl<S> UnwindSafe for CopyToBytes<S>
impl<S, T, E> TryStream for CopyToBytes<S>
fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>
impl<S: $crate::fmt::Debug> Debug for CopyToBytes<S>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<S: Stream> Stream for CopyToBytes<S>
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<<Self as >::Item>>
impl<T> Any for CopyToBytes<S>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for CopyToBytes<S>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for CopyToBytes<S>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for CopyToBytes<S>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for CopyToBytes<S>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for CopyToBytes<S>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for CopyToBytes<S>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>