pub struct Json<T>(pub T)
where
T: 'static + Serialize + for<'d> Deserialize<'d>;Available on crate feature
json only.Expand description
A wrapper around a type that implements serde::Serialize and serde::Deserialize,
thus allowing us to parse and serialize it from / to json when we read / write a
directory structure.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'de, T> Deserialize<'de> for Json<T>where
T: 'static + Serialize + for<'d> Deserialize<'d>,
impl<'de, T> Deserialize<'de> for Json<T>where
T: 'static + Serialize + for<'d> Deserialize<'d>,
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
Source§impl<'a, T> FromRefForWriter<'a> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<'a, T> FromRefForWriter<'a> for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Source§impl<T> NewtypeToInner for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<T> NewtypeToInner for Json<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<T> Copy for Json<T>
impl<T> Eq for Json<T>
impl<T> StructuralPartialEq for Json<T>where
T: 'static + Serialize + for<'d> Deserialize<'d>,
Auto Trait Implementations§
impl<T> Freeze for Json<T>where
T: Freeze,
impl<T> RefUnwindSafe for Json<T>where
T: RefUnwindSafe,
impl<T> Send for Json<T>where
T: Send,
impl<T> Sync for Json<T>where
T: Sync,
impl<T> Unpin for Json<T>where
T: Unpin,
impl<T> UnwindSafe for Json<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§impl<T> DirStructureItem for T
impl<T> DirStructureItem for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.