pub struct Via<C, P>(/* private fields */);Expand description
The Lean type of codec C as the Rust type the primitive P chose.
Trait Implementations§
Source§impl<C: Codec, P: Primitive<Lean = C::Rust>> Codec for Via<C, P>
impl<C: Codec, P: Primitive<Lean = C::Rust>> Codec for Via<C, P>
Source§fn into_lean(value: P::Rust) -> Value<Self>
fn into_lean(value: P::Rust) -> Value<Self>
The Lean value of a Rust value that is given up. What can move is moved.
Source§fn to_lean(value: &P::Rust) -> Value<Self>
fn to_lean(value: &P::Rust) -> Value<Self>
The Lean value of a Rust value that stays with the caller. A copy.
Auto Trait Implementations§
impl<C, P> Forget for Via<C, P>
impl<C, P> Freeze for Via<C, P>
impl<C, P> Move for Via<C, P>
impl<C, P> RefUnwindSafe for Via<C, P>where
C: RefUnwindSafe,
P: RefUnwindSafe,
impl<C, P> Send for Via<C, P>
impl<C, P> Sync for Via<C, P>
impl<C, P> Unpin for Via<C, P>
impl<C, P> UnsafeUnpin for Via<C, P>
impl<C, P> UnwindSafe for Via<C, P>where
C: UnwindSafe,
P: 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