pub struct PySerializeWrap<T>(pub T);
Available on crate features
serde
and python
only.Expand description
Serialization wrapper for T: TrySerializeToBytes that attaches Python version metadata.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<'a, T: TrySerializeToBytes> Deserialize<'a> for PySerializeWrap<T>
impl<'a, T: TrySerializeToBytes> Deserialize<'a> for PySerializeWrap<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: TrySerializeToBytes> Serialize for PySerializeWrap<&T>
impl<T: TrySerializeToBytes> Serialize for PySerializeWrap<&T>
Auto Trait Implementations§
impl<T> Freeze for PySerializeWrap<T>where
T: Freeze,
impl<T> RefUnwindSafe for PySerializeWrap<T>where
T: RefUnwindSafe,
impl<T> Send for PySerializeWrap<T>where
T: Send,
impl<T> Sync for PySerializeWrap<T>where
T: Sync,
impl<T> Unpin for PySerializeWrap<T>where
T: Unpin,
impl<T> UnwindSafe for PySerializeWrap<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> 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