[][src]Struct bytecodec::combinator::MapFrom

pub struct MapFrom<E, T, F> { /* fields omitted */ }

Combinator for converting items into ones that suited to the inner encoder by calling the given function.

This is created by calling EncodeExt::map_from method.

Methods

impl<E, T, F> MapFrom<E, T, F>[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, T, F> Encode for MapFrom<E, T, F> where
    E: Encode,
    F: Fn(T) -> E::Item
[src]

type Item = T

The type of items to be encoded.

impl<E, T, F> SizedEncode for MapFrom<E, T, F> where
    E: SizedEncode,
    F: Fn(T) -> E::Item
[src]

impl<E: Debug, T: Debug, F: Debug> Debug for MapFrom<E, T, F>[src]

Auto Trait Implementations

impl<E, T, F> Send for MapFrom<E, T, F> where
    E: Send,
    F: Send,
    T: Send

impl<E, T, F> Unpin for MapFrom<E, T, F> where
    E: Unpin,
    F: Unpin,
    T: Unpin

impl<E, T, F> Sync for MapFrom<E, T, F> where
    E: Sync,
    F: Sync,
    T: Sync

impl<E, T, F> UnwindSafe for MapFrom<E, T, F> where
    E: UnwindSafe,
    F: UnwindSafe,
    T: UnwindSafe

impl<E, T, F> RefUnwindSafe for MapFrom<E, T, F> where
    E: RefUnwindSafe,
    F: RefUnwindSafe,
    T: RefUnwindSafe

Blanket Implementations

impl<T> IoEncodeExt for T where
    T: Encode
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]