pub struct IdentityMapper<C>(pub PhantomData<C>);
Expand description
An identity mapper that does not change the parsed object Used in situations when we need prove U: DisjointFrom<Mapped<…>> in which case we can wrap U in Mapped and use existing impls
Tuple Fields§
§0: PhantomData<C>
Implementations§
Source§impl<C> IdentityMapper<C>
impl<C> IdentityMapper<C>
Trait Implementations§
Source§impl<C: Debug> Debug for IdentityMapper<C>
impl<C: Debug> Debug for IdentityMapper<C>
Source§impl<C: Combinator> Iso for IdentityMapper<C>where
C::V: SecureSpecCombinator<SpecResult = <C::Owned as View>::V>,
impl<C: Combinator> Iso for IdentityMapper<C>where
C::V: SecureSpecCombinator<SpecResult = <C::Owned as View>::V>,
Source§type Src<'a> = <C as Combinator>::Result<'a>
type Src<'a> = <C as Combinator>::Result<'a>
The source type of the isomorphism.
Source§type Dst<'a> = <C as Combinator>::Result<'a>
type Dst<'a> = <C as Combinator>::Result<'a>
The destination type of the isomorphism.
Source§type SrcOwned = <C as Combinator>::Owned
type SrcOwned = <C as Combinator>::Owned
The owned version of the source type.
Source§type DstOwned = <C as Combinator>::Owned
type DstOwned = <C as Combinator>::Owned
The owned version of the destination type.
Source§impl<C: SpecCombinator> SpecIso for IdentityMapper<C>
impl<C: SpecCombinator> SpecIso for IdentityMapper<C>
Source§type Src = <C as SpecCombinator>::SpecResult
type Src = <C as SpecCombinator>::SpecResult
The source type of the isomorphism.
Source§type Dst = <C as SpecCombinator>::SpecResult
type Dst = <C as SpecCombinator>::SpecResult
The destination type of the isomorphism.
Source§impl<C: View> View for IdentityMapper<C>
impl<C: View> View for IdentityMapper<C>
type V = IdentityMapper<<C as View>::V>
Auto Trait Implementations§
impl<C> Freeze for IdentityMapper<C>
impl<C> RefUnwindSafe for IdentityMapper<C>where
C: RefUnwindSafe,
impl<C> Send for IdentityMapper<C>where
C: Send,
impl<C> Sync for IdentityMapper<C>where
C: Sync,
impl<C> Unpin for IdentityMapper<C>where
C: Unpin,
impl<C> UnwindSafe for IdentityMapper<C>where
C: UnwindSafe,
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
Source§impl<T> From<T> for Twhere
T: View,
<T as View>::V: SpecFrom<<T as View>::V>,
impl<T> From<T> for Twhere
T: View,
<T as View>::V: SpecFrom<<T as View>::V>,
Source§fn ex_from(t: T) -> T
fn ex_from(t: T) -> T
Vest equivalent of
std::convert::From::from
.Source§impl<T, U> Into<U> for T
impl<T, U> Into<U> for T
Source§fn ex_into(self) -> U
fn ex_into(self) -> U
Vest equivalent of
std::convert::Into::into
.Source§impl<T, U> SpecTryInto<U> for Twhere
U: SpecTryFrom<T>,
impl<T, U> SpecTryInto<U> for Twhere
U: SpecTryFrom<T>,
Source§type Error = <U as SpecTryFrom<T>>::Error
type Error = <U as SpecTryFrom<T>>::Error
The type returned in the event of a conversion error.