PartialIso

Trait PartialIso 

Source
pub trait PartialIso<'x>: View
where Self::V: SpecPartialIso<Src = <Self::Src as View>::V, Dst = <Self::Dst as View>::V>, <Self::Src as View>::V: SpecTryFrom<<Self::Dst as View>::V>, <Self::Dst as View>::V: SpecTryFrom<<Self::Src as View>::V>, Self::Dst: 'x,
{ type Src: View; type RefSrc: View<V = <Self::Src as View>::V> + TryFrom<&'x Self::Dst>; type Dst: View + TryFrom<Self::Src>; }
Expand description

Fallible version of Iso.

Required Associated Types§

Source

type Src: View

The source type

Source

type RefSrc: View<V = <Self::Src as View>::V> + TryFrom<&'x Self::Dst>

The reference of the [Src] type.

Source

type Dst: View + TryFrom<Self::Src>

The destination type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'x> PartialIso<'x> for VarIntMapper

Source§

type Src = (u8, Either<&'x [u8], Either<u16, Either<u32, u64>>>)

Source§

type Dst = VarInt

Source§

type RefSrc = (&'x u8, Either<&'x &'x [u8], Either<&'x u16, Either<&'x u32, &'x u64>>>)