Struct model_mapper::with::IntoMapper
source · pub struct IntoMapper;Expand description
Mapper that uses the Into trait
Trait Implementations§
source§impl<F, I> TypeMapper<F, I> for IntoMapperwhere
F: Into<I>,
impl<F, I> TypeMapper<F, I> for IntoMapperwhere
F: Into<I>,
source§fn try_map(from: F) -> Result<I, Infallible>
fn try_map(from: F) -> Result<I, Infallible>
Maps between types
source§fn map_wrapped<W>(from: W) -> <W as Wrapper<F>>::Wrapper<I>where
W: Wrapper<F>,
fn map_wrapped<W>(from: W) -> <W as Wrapper<F>>::Wrapper<I>where
W: Wrapper<F>,
Maps between Wrapper types
source§fn try_map_wrapped<W>(
from: W,
) -> Result<<W as Wrapper<F>>::Wrapper<I>, Infallible>where
W: Wrapper<F>,
fn try_map_wrapped<W>(
from: W,
) -> Result<<W as Wrapper<F>>::Wrapper<I>, Infallible>where
W: Wrapper<F>,
Maps between Wrapper types
source§fn map_nested_wrapped<NW, W>(
from: NW,
) -> <NW as NestedWrapper<W, F>>::NestedWrapper<I>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
fn map_nested_wrapped<NW, W>(
from: NW,
) -> <NW as NestedWrapper<W, F>>::NestedWrapper<I>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
Maps between Wrapper types
source§fn try_map_nested_wrapped<NW, W>(
from: NW,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
fn try_map_nested_wrapped<NW, W>(
from: NW,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
Maps between Wrapper types
source§fn map_into_option(from: F) -> Option<I>
fn map_into_option(from: F) -> Option<I>
Maps encapsulating into an Option
source§fn try_map_into_option(from: F) -> Result<Option<I>, Infallible>
fn try_map_into_option(from: F) -> Result<Option<I>, Infallible>
Maps encapsulating into an Option
source§fn map_wrapped_into_option<W>(from: W) -> Option<<W as Wrapper<F>>::Wrapper<I>>where
W: Wrapper<F>,
fn map_wrapped_into_option<W>(from: W) -> Option<<W as Wrapper<F>>::Wrapper<I>>where
W: Wrapper<F>,
source§fn try_map_wrapped_into_option<W>(
from: W,
) -> Result<Option<<W as Wrapper<F>>::Wrapper<I>>, Infallible>where
W: Wrapper<F>,
fn try_map_wrapped_into_option<W>(
from: W,
) -> Result<Option<<W as Wrapper<F>>::Wrapper<I>>, Infallible>where
W: Wrapper<F>,
source§fn map_nested_wrapped_into_option<NW, W>(
from: NW,
) -> Option<<NW as NestedWrapper<W, F>>::NestedWrapper<I>>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
fn map_nested_wrapped_into_option<NW, W>(
from: NW,
) -> Option<<NW as NestedWrapper<W, F>>::NestedWrapper<I>>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
source§fn try_map_nested_wrapped_into_option<NW, W>(
from: NW,
) -> Result<Option<<NW as NestedWrapper<W, F>>::NestedWrapper<I>>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
fn try_map_nested_wrapped_into_option<NW, W>(
from: NW,
) -> Result<Option<<NW as NestedWrapper<W, F>>::NestedWrapper<I>>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
source§fn try_map_removing_option(from: Option<F>) -> Result<I, MapperError>
fn try_map_removing_option(from: Option<F>) -> Result<I, MapperError>
Maps removing an Option
source§fn try_map_wrapped_removing_option<W>(
from: Option<W>,
) -> Result<<W as Wrapper<F>>::Wrapper<I>, MapperError>where
W: Wrapper<F>,
fn try_map_wrapped_removing_option<W>(
from: Option<W>,
) -> Result<<W as Wrapper<F>>::Wrapper<I>, MapperError>where
W: Wrapper<F>,
Maps a wrapped type removing an Option
source§fn map_wrapped_removing_option_default<W>(
from: Option<W>,
) -> <W as Wrapper<F>>::Wrapper<I>
fn map_wrapped_removing_option_default<W>( from: Option<W>, ) -> <W as Wrapper<F>>::Wrapper<I>
source§fn try_map_wrapped_removing_option_default<W>(
from: Option<W>,
) -> Result<<W as Wrapper<F>>::Wrapper<I>, Infallible>
fn try_map_wrapped_removing_option_default<W>( from: Option<W>, ) -> Result<<W as Wrapper<F>>::Wrapper<I>, Infallible>
source§fn try_map_nested_wrapped_removing_option<NW, W>(
from: Option<NW>,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, MapperError>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
fn try_map_nested_wrapped_removing_option<NW, W>(
from: Option<NW>,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, MapperError>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
Maps a nested wrapped type removing an Option
source§fn map_nested_wrapped_removing_option_default<NW, W>(
from: Option<NW>,
) -> <NW as NestedWrapper<W, F>>::NestedWrapper<I>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
<NW as NestedWrapper<W, F>>::NestedWrapper<I>: Default,
fn map_nested_wrapped_removing_option_default<NW, W>(
from: Option<NW>,
) -> <NW as NestedWrapper<W, F>>::NestedWrapper<I>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
<NW as NestedWrapper<W, F>>::NestedWrapper<I>: Default,
source§fn try_map_nested_wrapped_removing_option_default<NW, W>(
from: Option<NW>,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
<NW as NestedWrapper<W, F>>::NestedWrapper<I>: Default,
fn try_map_nested_wrapped_removing_option_default<NW, W>(
from: Option<NW>,
) -> Result<<NW as NestedWrapper<W, F>>::NestedWrapper<I>, Infallible>where
NW: NestedWrapper<W, F>,
W: Wrapper<F>,
<NW as NestedWrapper<W, F>>::NestedWrapper<I>: Default,
Auto Trait Implementations§
impl Freeze for IntoMapper
impl RefUnwindSafe for IntoMapper
impl Send for IntoMapper
impl Sync for IntoMapper
impl Unpin for IntoMapper
impl UnwindSafe for IntoMapper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more