pub struct FramedRead<T, D> { /* private fields */ }
Implementations§
Source§impl<T, D> FramedRead<T, D>
impl<T, D> FramedRead<T, D>
pub fn new(inner: T, decoder: D) -> FramedRead<T, D>
pub fn with_capacity(inner: T, decoder: D, capacity: usize) -> FramedRead<T, D>
Source§impl<T, D> FramedRead<T, D>
impl<T, D> FramedRead<T, D>
pub fn get_ref(&self) -> &T
pub fn get_mut(&mut self) -> &mut T
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>
pub fn into_inner(self) -> T
pub fn decoder(&self) -> &D
pub fn decoder_mut(&mut self) -> &mut D
pub fn read_buffer(&self) -> &BytesMut
pub fn read_buffer_mut(&mut self) -> &mut BytesMut
Trait Implementations§
Source§impl<T, D> Debug for FramedRead<T, D>
impl<T, D> Debug for FramedRead<T, D>
Source§impl<T, I, D> Sink<I> for FramedRead<T, D>where
T: Sink<I>,
impl<T, I, D> Sink<I> for FramedRead<T, D>where
T: Sink<I>,
Source§type Error = <T as Sink<I>>::Error
type Error = <T as Sink<I>>::Error
The type of value produced by the sink when an error occurs.
Source§fn poll_ready(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Attempts to prepare the
Sink
to receive a value. Read moreSource§fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: I) -> Result<(), Self::Error>
Begin the process of sending a value to the sink.
Each call to this function must be preceded by a successful call to
poll_ready
which returned Poll::Ready(Ok(()))
. Read moreSource§impl<T, D> Stream for FramedRead<T, D>
impl<T, D> Stream for FramedRead<T, D>
Source§type Item = Result<<D as Decoder>::Item, Error<<D as Decoder>::Error>>
type Item = Result<<D as Decoder>::Item, Error<<D as Decoder>::Error>>
Values yielded by the stream.
impl<'__pin, T, D> Unpin for FramedRead<T, D>where
PinnedFieldsOf<__Origin<'__pin, T, D>>: Unpin,
Auto Trait Implementations§
impl<T, D> Freeze for FramedRead<T, D>
impl<T, D> RefUnwindSafe for FramedRead<T, D>where
T: RefUnwindSafe,
D: RefUnwindSafe,
impl<T, D> Send for FramedRead<T, D>
impl<T, D> Sync for FramedRead<T, D>
impl<T, D> UnwindSafe for FramedRead<T, D>where
T: UnwindSafe,
D: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more