Struct async_codec_lite::Framed
source · [−]pub struct Framed<T, U> { /* private fields */ }
Implementations
sourceimpl<T, U> Framed<T, U>
impl<T, U> Framed<T, U>
pub fn new(inner: T, codec: U) -> Framed<T, U>
pub fn with_capacity(inner: T, codec: U, capacity: usize) -> Framed<T, U>
pub fn from_parts(parts: FramedParts<T, U>) -> Framed<T, U>
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 codec(&self) -> &U
pub fn codec_mut(&mut self) -> &mut U
pub fn read_buffer(&self) -> &BytesMut
pub fn read_buffer_mut(&mut self) -> &mut BytesMut
pub fn into_inner(self) -> T
pub fn into_parts(self) -> FramedParts<T, U>
Trait Implementations
sourceimpl<T, U> Sink<<U as Encoder>::Item> for Framed<T, U> where
T: AsyncWrite,
U: Encoder,
impl<T, U> Sink<<U as Encoder>::Item> for Framed<T, U> where
T: AsyncWrite,
U: Encoder,
type Error = Error<<U as Encoder>::Error>
type Error = Error<<U as Encoder>::Error>
The type of value produced by the sink when an error occurs.
sourcefn 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 more
sourcefn start_send(self: Pin<&mut Self>, item: U::Item) -> Result<(), Self::Error>
fn start_send(self: Pin<&mut Self>, item: U::Item) -> 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 more
sourceimpl<T, U> Stream for Framed<T, U> where
T: AsyncRead,
U: Decoder,
impl<T, U> Stream for Framed<T, U> where
T: AsyncRead,
U: Decoder,
impl<'__pin, T, U> Unpin for Framed<T, U> where
__Origin<'__pin, T, U>: Unpin,
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Framed<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Framed<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for Framed<T, U> where
T: Sync,
U: Sync,
impl<T, U> UnwindSafe for Framed<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more