[−][src]Struct amp_async::Codec
Methods
impl<D> Codec<D> where
D: Default,
[src]
D: Default,
Trait Implementations
impl<D: Default> Default for Codec<D>
[src]
impl<D: PartialEq> PartialEq<Codec<D>> for Codec<D>
[src]
impl<D: Debug> Debug for Codec<D>
[src]
impl<D, K, V> Encoder for Codec<D> where
D: IntoIterator<Item = (K, V)>,
K: AsRef<[u8]>,
V: AsRef<[u8]>,
[src]
D: IntoIterator<Item = (K, V)>,
K: AsRef<[u8]>,
V: AsRef<[u8]>,
type Error = CodecError
The type of encoding errors. Read more
type Item = D
The type of items consumed by the Encoder
fn encode(&mut self, item: D, dst: &mut BytesMut) -> Result<(), Self::Error>
[src]
impl<D> Decoder for Codec<D> where
D: Default + Extend<(Bytes, Bytes)>,
[src]
D: Default + Extend<(Bytes, Bytes)>,
type Error = CodecError
The type of unrecoverable frame decoding errors. Read more
type Item = D
The type of decoded frames.
fn decode(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn framed<T>(self, io: T) -> Framed<T, Self> where
Self: Encoder,
T: AsyncRead + AsyncWrite,
[src]
Self: Encoder,
T: AsyncRead + AsyncWrite,
Auto Trait Implementations
impl<D> Send for Codec<D> where
D: Send,
D: Send,
impl<D> Unpin for Codec<D> where
D: Unpin,
D: Unpin,
impl<D> Sync for Codec<D> where
D: Sync,
D: Sync,
impl<D> RefUnwindSafe for Codec<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
impl<D> UnwindSafe for Codec<D> where
D: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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,