Struct serde_tagged::de::BoxFnSeed
source · pub struct BoxFnSeed<V>(/* private fields */);
Expand description
A boxed (immutable) closure that can be used as DeserializeSeed
.
It additionally requires the wrapped closure to implement Sync
which
allows for easy static type-registry creation, e.g. in combination with
BTreeMap<&'static str, _>
.
Implementations§
Trait Implementations§
source§impl<'de, 'b, V> DeserializeSeed<'de> for &'b BoxFnSeed<V>
impl<'de, 'b, V> DeserializeSeed<'de> for &'b BoxFnSeed<V>
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.source§impl<'de, V> DeserializeSeed<'de> for BoxFnSeed<V>
impl<'de, V> DeserializeSeed<'de> for BoxFnSeed<V>
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<V> Freeze for BoxFnSeed<V>
impl<V> !RefUnwindSafe for BoxFnSeed<V>
impl<V> !Send for BoxFnSeed<V>
impl<V> Sync for BoxFnSeed<V>
impl<V> Unpin for BoxFnSeed<V>
impl<V> !UnwindSafe for BoxFnSeed<V>
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