pub struct SerdeTerm<T>(pub T);Expand description
Wrapper type to en- and decode serde terms
If the wrapped type implements serde::Serialize, SerdeTerm<T> implements
Encoder and will thus be transparently converted to a BEAM object.
If the wrapped type implements serde::Deserialize, it implements Decoder
and can thus be transparently converted from a BEAM object.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'a, T: Deserialize<'a> + 'a> Decoder<'a> for SerdeTerm<T>
impl<'a, T: Deserialize<'a> + 'a> Decoder<'a> for SerdeTerm<T>
Auto Trait Implementations§
impl<T> Freeze for SerdeTerm<T>where
T: Freeze,
impl<T> RefUnwindSafe for SerdeTerm<T>where
T: RefUnwindSafe,
impl<T> Send for SerdeTerm<T>where
T: Send,
impl<T> Sync for SerdeTerm<T>where
T: Sync,
impl<T> Unpin for SerdeTerm<T>where
T: Unpin,
impl<T> UnwindSafe for SerdeTerm<T>where
T: 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