[−][src]Struct bytecodec::combinator::Last
Combinator for representing encoders that accepts only one additional item.
This is created by calling EncodeExt::last.
Methods
impl<E: Encode> Last<E>[src]
pub fn inner_ref(&self) -> &E[src]
Returns a reference to the inner encoder.
pub fn inner_mut(&mut self) -> &mut E[src]
Returns a mutable reference to the inner encoder.
pub fn into_inner(self) -> E[src]
Takes ownership of this instance and returns the inner encoder.
Trait Implementations
impl<E: Debug + Encode> Debug for Last<E> where
E::Item: Debug, [src]
E::Item: Debug,
impl<E: Default + Encode> Default for Last<E> where
E::Item: Default, [src]
E::Item: Default,
impl<E: Encode> Encode for Last<E>[src]
type Item = Never
The type of items to be encoded.
fn encode(&mut self, buf: &mut [u8], eos: Eos) -> Result<usize>[src]
fn start_encoding(&mut self, _item: Self::Item) -> Result<()>[src]
fn is_idle(&self) -> bool[src]
fn requiring_bytes(&self) -> ByteCount[src]
impl<E: SizedEncode> SizedEncode for Last<E>[src]
fn exact_requiring_bytes(&self) -> u64[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for Last<E> where
E: RefUnwindSafe,
<E as Encode>::Item: RefUnwindSafe,
E: RefUnwindSafe,
<E as Encode>::Item: RefUnwindSafe,
impl<E> Send for Last<E> where
E: Send,
<E as Encode>::Item: Send,
E: Send,
<E as Encode>::Item: Send,
impl<E> Sync for Last<E> where
E: Sync,
<E as Encode>::Item: Sync,
E: Sync,
<E as Encode>::Item: Sync,
impl<E> Unpin for Last<E> where
E: Unpin,
<E as Encode>::Item: Unpin,
E: Unpin,
<E as Encode>::Item: Unpin,
impl<E> UnwindSafe for Last<E> where
E: UnwindSafe,
<E as Encode>::Item: UnwindSafe,
E: UnwindSafe,
<E as Encode>::Item: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IoEncodeExt for T where
T: Encode, [src]
T: Encode,
fn encode_to_write_buf<B>(&mut self, buf: &mut WriteBuf<B>) -> Result<()> where
B: AsMut<[u8]>, [src]
B: AsMut<[u8]>,
fn encode_all<W: Write>(&mut self, writer: W) -> Result<()>[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>,