pub struct Serde<T>(pub T);
Expand description
A convenience wrapper to be used as a type parameter, for example when
a Vec<T>
or an HashMap<K, V>
need to be passed to serde.
Tuple Fields§
§0: T
Implementations§
Source§impl<'de, T> Serde<T>
impl<'de, T> Serde<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes this wrapper, returning the inner value.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Serde<T>
impl<'de, T> Deserialize<'de> for Serde<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for Serde<T>
impl<T> StructuralPartialEq for Serde<T>
Auto Trait Implementations§
impl<T> Freeze for Serde<T>where
T: Freeze,
impl<T> RefUnwindSafe for Serde<T>where
T: RefUnwindSafe,
impl<T> Send for Serde<T>where
T: Send,
impl<T> Sync for Serde<T>where
T: Sync,
impl<T> Unpin for Serde<T>where
T: Unpin,
impl<T> UnwindSafe for Serde<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)