pub struct PrimitiveValue<'a, P: Primitive>(pub &'a P);Expand description
A primitive’s value, written straight to a serializer.
This wrapper and the three below carry a primitive into serde, so a
generated type writes it as a map entry without building a Value first.
Tuple Fields§
§0: &'a PTrait Implementations§
Auto Trait Implementations§
impl<'a, P> Freeze for PrimitiveValue<'a, P>
impl<'a, P> RefUnwindSafe for PrimitiveValue<'a, P>where
&'a P: RefUnwindSafe,
impl<'a, P> Send for PrimitiveValue<'a, P>
impl<'a, P> Sync for PrimitiveValue<'a, P>
impl<'a, P> Unpin for PrimitiveValue<'a, P>
impl<'a, P> UnsafeUnpin for PrimitiveValue<'a, P>where
&'a P: UnsafeUnpin,
impl<'a, P> UnwindSafe for PrimitiveValue<'a, P>where
&'a 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