pub struct DeserializeWithRing<R: RingStore>where
R::Type: SerializableElementRing,{ /* private fields */ }
Available on crate feature
unstable-enable
only.Expand description
Wrapper of a ring that implements [serde::DeserializationSeed
] by trying to deserialize an element
w.r.t. the wrapped ring.
§Availability
This API is marked as unstable and is only available when the unstable-enable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Implementations§
Source§impl<R> DeserializeWithRing<R>
impl<R> DeserializeWithRing<R>
Trait Implementations§
Source§impl<R: Clone + RingStore> Clone for DeserializeWithRing<R>where
R::Type: SerializableElementRing,
impl<R: Clone + RingStore> Clone for DeserializeWithRing<R>where
R::Type: SerializableElementRing,
Source§fn clone(&self) -> DeserializeWithRing<R>
fn clone(&self) -> DeserializeWithRing<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, R> DeserializeSeed<'de> for DeserializeWithRing<R>
impl<'de, R> DeserializeSeed<'de> for DeserializeWithRing<R>
Source§type Value = <<R as RingStore>::Type as RingBase>::Element
type Value = <<R as RingStore>::Type as RingBase>::Element
The type produced by using this seed.
Source§fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(self, deserializer: D) -> Result<Self::Value, D::Error>where
D: Deserializer<'de>,
Equivalent to the more common
Deserialize::deserialize
method, except
with some initial piece of data (the seed) passed in.Auto Trait Implementations§
impl<R> Freeze for DeserializeWithRing<R>where
R: Freeze,
impl<R> RefUnwindSafe for DeserializeWithRing<R>where
R: RefUnwindSafe,
impl<R> Send for DeserializeWithRing<R>where
R: Send,
impl<R> Sync for DeserializeWithRing<R>where
R: Sync,
impl<R> Unpin for DeserializeWithRing<R>where
R: Unpin,
impl<R> UnwindSafe for DeserializeWithRing<R>where
R: 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> 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