pub struct RonPretty<T>(pub T)
where
T: 'static + Serialize + for<'d> Deserialize<'d>;Available on crate feature
ron 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 ron when we read / write a
directory structure.
This is a pretty-printed version of Ron.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'de, T> Deserialize<'de> for RonPretty<T>where
T: 'static + Serialize + for<'d> Deserialize<'d>,
impl<'de, T> Deserialize<'de> for RonPretty<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, 'vfs, T, Vfs: WriteSupportingVfs<'vfs> + 'vfs> FromRefForWriter<'a, 'vfs, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
'vfs: 'a,
impl<'a, 'vfs, T, Vfs: WriteSupportingVfs<'vfs> + 'vfs> FromRefForWriter<'a, 'vfs, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
'vfs: 'a,
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for RonPretty<T>
Available on crate feature async only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> FromRefForWriterAsync<'a, Vfs> for RonPretty<T>
Available on crate feature
async only.Source§type Wr = RonPrettyRefWr<'a, 'a, T, Vfs>
type Wr = RonPrettyRefWr<'a, 'a, T, Vfs>
The reference type to cast to.
Source§fn from_ref_for_writer_async(
value: &'a <Self as FromRefForWriterAsync<'a, Vfs>>::Inner,
) -> Self::Wr
fn from_ref_for_writer_async( value: &'a <Self as FromRefForWriterAsync<'a, Vfs>>::Inner, ) -> Self::Wr
Casts the reference to the inner type to a
WriteToAsync
reference type.Source§impl<T> NewtypeToInner for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<T> NewtypeToInner for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Source§impl<T> Ord for RonPretty<T>
impl<T> Ord for RonPretty<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialOrd for RonPretty<T>
impl<T> PartialOrd for RonPretty<T>
Source§impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<'a, T, Vfs: Vfs<'a>> ReadFrom<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Source§impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature async only.
impl<'a, T, Vfs: VfsAsync + 'static> ReadFromAsync<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Available on crate feature
async only.Source§impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
impl<'a, T, Vfs: WriteSupportingVfs<'a>> WriteTo<'a, Vfs> for RonPretty<T>where
T: Serialize + for<'d> Deserialize<'d> + 'static,
Source§impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPretty<T>
Available on crate feature async only.
impl<'a, T, Vfs: WriteSupportingVfsAsync + 'static> WriteToAsync<'a, Vfs> for RonPretty<T>
Available on crate feature
async only.impl<T> Copy for RonPretty<T>
impl<T> Eq for RonPretty<T>
impl<T> StructuralPartialEq for RonPretty<T>where
T: 'static + Serialize + for<'d> Deserialize<'d>,
Auto Trait Implementations§
impl<T> Freeze for RonPretty<T>where
T: Freeze,
impl<T> RefUnwindSafe for RonPretty<T>where
T: RefUnwindSafe,
impl<T> Send for RonPretty<T>where
T: Send,
impl<T> Sync for RonPretty<T>where
T: Sync,
impl<T> Unpin for RonPretty<T>where
T: Unpin,
impl<T> UnwindSafe for RonPretty<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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more