[−][src]Struct bytecodec::combinator::TryMap
Combinator which tries to convert decoded values by calling the specified function.
This is created by calling DecodeExt::try_map
method.
Methods
impl<D, T, E, F> TryMap<D, T, E, F>
[src]
pub fn inner_ref(&self) -> &D
[src]
Returns a reference to the inner decoder.
pub fn inner_mut(&mut self) -> &mut D
[src]
Returns a mutable reference to the inner decoder.
pub fn into_inner(self) -> D
[src]
Takes ownership of this instance and returns the inner decoder.
Trait Implementations
impl<D: Debug, T: Debug, E: Debug, F: Debug> Debug for TryMap<D, T, E, F>
[src]
impl<D, T, E, F> Decode for TryMap<D, T, E, F> where
D: Decode,
F: Fn(D::Item) -> Result<T, E>,
Error: From<E>,
[src]
D: Decode,
F: Fn(D::Item) -> Result<T, E>,
Error: From<E>,
Auto Trait Implementations
impl<D, T, E, F> RefUnwindSafe for TryMap<D, T, E, F> where
D: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
E: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<D, T, E, F> Send for TryMap<D, T, E, F> where
D: Send,
E: Send,
F: Send,
T: Send,
D: Send,
E: Send,
F: Send,
T: Send,
impl<D, T, E, F> Sync for TryMap<D, T, E, F> where
D: Sync,
E: Sync,
F: Sync,
T: Sync,
D: Sync,
E: Sync,
F: Sync,
T: Sync,
impl<D, T, E, F> Unpin for TryMap<D, T, E, F> where
D: Unpin,
E: Unpin,
F: Unpin,
T: Unpin,
D: Unpin,
E: Unpin,
F: Unpin,
T: Unpin,
impl<D, T, E, F> UnwindSafe for TryMap<D, T, E, F> where
D: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
E: UnwindSafe,
F: UnwindSafe,
T: 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> IoDecodeExt for T where
T: Decode,
[src]
T: Decode,
fn decode_from_read_buf<B>(&mut self, buf: &mut ReadBuf<B>) -> Result<()> where
B: AsRef<[u8]>,
[src]
B: AsRef<[u8]>,
fn decode_exact<R: Read>(&mut self, reader: R) -> Result<Self::Item>
[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>,