pub trait Deserialize<T, D: Fallible + ?Sized> {
// Required method
fn deserialize(&self, deserializer: &mut D) -> Result<T, D::Error>;
}
Expand description
Converts a type back from its archived form.
Some types may require specific deserializer capabilities, such as Rc
and
Arc
. In these cases, the deserializer type D
should be bound so that it
implements traits that provide those capabilities (e.g.
Pooling
).
This can be derived with Deserialize
.
Required Methods§
Sourcefn deserialize(&self, deserializer: &mut D) -> Result<T, D::Error>
fn deserialize(&self, deserializer: &mut D) -> Result<T, D::Error>
Deserializes using the given deserializer
Implementations on Foreign Types§
Source§impl<D: Fallible + ?Sized> Deserialize<PhantomPinned, D> for PhantomPinned
impl<D: Fallible + ?Sized> Deserialize<PhantomPinned, D> for PhantomPinned
fn deserialize(&self, _: &mut D) -> Result<PhantomPinned, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI16_be, D> for NonZeroI16_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroI16_be, D> for NonZeroI16_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroI16_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI16_le, D> for NonZeroI16_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroI16_le, D> for NonZeroI16_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroI16_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI32_be, D> for NonZeroI32_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroI32_be, D> for NonZeroI32_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroI32_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI32_le, D> for NonZeroI32_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroI32_le, D> for NonZeroI32_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroI32_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI64_be, D> for NonZeroI64_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroI64_be, D> for NonZeroI64_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroI64_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI64_le, D> for NonZeroI64_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroI64_le, D> for NonZeroI64_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroI64_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI128_be, D> for NonZeroI128_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroI128_be, D> for NonZeroI128_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroI128_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroI128_le, D> for NonZeroI128_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroI128_le, D> for NonZeroI128_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroI128_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU16_be, D> for NonZeroU16_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroU16_be, D> for NonZeroU16_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroU16_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU16_le, D> for NonZeroU16_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroU16_le, D> for NonZeroU16_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroU16_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU32_be, D> for NonZeroU32_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroU32_be, D> for NonZeroU32_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroU32_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU32_le, D> for NonZeroU32_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroU32_le, D> for NonZeroU32_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroU32_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU64_be, D> for NonZeroU64_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroU64_be, D> for NonZeroU64_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroU64_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU64_le, D> for NonZeroU64_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroU64_le, D> for NonZeroU64_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroU64_le, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU128_be, D> for NonZeroU128_be
impl<D: Fallible + ?Sized> Deserialize<NonZeroU128_be, D> for NonZeroU128_be
fn deserialize(&self, _: &mut D) -> Result<NonZeroU128_be, D::Error>
Source§impl<D: Fallible + ?Sized> Deserialize<NonZeroU128_le, D> for NonZeroU128_le
impl<D: Fallible + ?Sized> Deserialize<NonZeroU128_le, D> for NonZeroU128_le
fn deserialize(&self, _: &mut D) -> Result<NonZeroU128_le, D::Error>
Source§impl<T, D> Deserialize<ManuallyDrop<T>, D> for ManuallyDrop<T::Archived>
impl<T, D> Deserialize<ManuallyDrop<T>, D> for ManuallyDrop<T::Archived>
fn deserialize(&self, deserializer: &mut D) -> Result<ManuallyDrop<T>, D::Error>
Source§impl<T: ?Sized, D: Fallible + ?Sized> Deserialize<PhantomData<T>, D> for PhantomData<T>
impl<T: ?Sized, D: Fallible + ?Sized> Deserialize<PhantomData<T>, D> for PhantomData<T>
fn deserialize(&self, _: &mut D) -> Result<PhantomData<T>, D::Error>
Implementors§
impl<D> Deserialize<CString, D> for ArchivedCString
Available on crate feature
alloc
only.impl<D> Deserialize<SocketAddrV4, D> for ArchivedSocketAddrV4
impl<D> Deserialize<NonZero<isize>, D> for ArchivedNonZeroIsize
impl<D> Deserialize<NonZero<usize>, D> for ArchivedNonZeroUsize
impl<D: Fallible + ?Sized> Deserialize<IpAddr, D> for ArchivedIpAddr
impl<D: Fallible + ?Sized> Deserialize<SocketAddr, D> for ArchivedSocketAddr
impl<D: Fallible + ?Sized> Deserialize<char, D> for ArchivedChar
impl<D: Fallible + ?Sized> Deserialize<f32, D> for ArchivedF32
impl<D: Fallible + ?Sized> Deserialize<f64, D> for ArchivedF64
impl<D: Fallible + ?Sized> Deserialize<i16, D> for ArchivedI16
impl<D: Fallible + ?Sized> Deserialize<i32, D> for ArchivedI32
impl<D: Fallible + ?Sized> Deserialize<i64, D> for ArchivedI64
impl<D: Fallible + ?Sized> Deserialize<i128, D> for ArchivedI128
impl<D: Fallible + ?Sized> Deserialize<isize, D> for ArchivedIsize
impl<D: Fallible + ?Sized> Deserialize<u16, D> for ArchivedU16
impl<D: Fallible + ?Sized> Deserialize<u32, D> for ArchivedU32
impl<D: Fallible + ?Sized> Deserialize<u64, D> for ArchivedU64
impl<D: Fallible + ?Sized> Deserialize<u128, D> for ArchivedU128
impl<D: Fallible + ?Sized> Deserialize<usize, D> for ArchivedUsize
impl<D: Fallible + ?Sized> Deserialize<String, D> for ArchivedString
Available on crate feature
alloc
only.impl<D: Fallible + ?Sized> Deserialize<Ipv4Addr, D> for ArchivedIpv4Addr
impl<D: Fallible + ?Sized> Deserialize<Ipv6Addr, D> for ArchivedIpv6Addr
impl<D: Fallible + ?Sized> Deserialize<SocketAddrV6, D> for ArchivedSocketAddrV6
impl<D: Fallible + ?Sized> Deserialize<NonZero<i16>, D> for ArchivedNonZeroI16
impl<D: Fallible + ?Sized> Deserialize<NonZero<i32>, D> for ArchivedNonZeroI32
impl<D: Fallible + ?Sized> Deserialize<NonZero<i64>, D> for ArchivedNonZeroI64
impl<D: Fallible + ?Sized> Deserialize<NonZero<i128>, D> for ArchivedNonZeroI128
impl<D: Fallible + ?Sized> Deserialize<NonZero<u16>, D> for ArchivedNonZeroU16
impl<D: Fallible + ?Sized> Deserialize<NonZero<u32>, D> for ArchivedNonZeroU32
impl<D: Fallible + ?Sized> Deserialize<NonZero<u64>, D> for ArchivedNonZeroU64
impl<D: Fallible + ?Sized> Deserialize<NonZero<u128>, D> for ArchivedNonZeroU128
impl<D: Fallible + ?Sized> Deserialize<RangeFull, D> for ArchivedRangeFull
impl<D: Fallible + ?Sized> Deserialize<Duration, D> for ArchivedDuration
impl<K, D> Deserialize<BTreeSet<K>, D> for ArchivedBTreeSet<K::Archived>
Available on crate feature
alloc
only.impl<K, D, S> Deserialize<HashSet<K, S>, D> for ArchivedHashSet<K::Archived>
Available on crate feature
std
only.impl<K, V, D> Deserialize<BTreeMap<K, V>, D> for ArchivedBTreeMap<K::Archived, V::Archived>where
K: Archive + Ord,
K::Archived: Deserialize<K, D> + Ord,
V: Archive,
V::Archived: Deserialize<V, D>,
D: Fallible + ?Sized,
Available on crate feature
alloc
only.impl<K, V, D, S> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived>where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
V: Archive,
V::Archived: Deserialize<V, D>,
D: Fallible + ?Sized,
S: Default + BuildHasher,
Available on crate feature
std
only.impl<T0, D> Deserialize<(T0,), D> for ArchivedTuple1<T0::Archived>
impl<T0, T1, D> Deserialize<(T0, T1), D> for ArchivedTuple2<T0::Archived, T1::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
impl<T0, T1, T2, D> Deserialize<(T0, T1, T2), D> for ArchivedTuple3<T0::Archived, T1::Archived, T2::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
impl<T0, T1, T2, T3, D> Deserialize<(T0, T1, T2, T3), D> for ArchivedTuple4<T0::Archived, T1::Archived, T2::Archived, T3::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
impl<T0, T1, T2, T3, T4, D> Deserialize<(T0, T1, T2, T3, T4), D> for ArchivedTuple5<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
impl<T0, T1, T2, T3, T4, T5, D> Deserialize<(T0, T1, T2, T3, T4, T5), D> for ArchivedTuple6<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
impl<T0, T1, T2, T3, T4, T5, T6, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6), D> for ArchivedTuple7<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7), D> for ArchivedTuple8<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7, T8), D> for ArchivedTuple9<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived, T8::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
T8::Archived: Deserialize<T8, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9), D> for ArchivedTuple10<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived, T8::Archived, T9::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
T9: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
T8::Archived: Deserialize<T8, D>,
T9::Archived: Deserialize<T9, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10), D> for ArchivedTuple11<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived, T8::Archived, T9::Archived, T10::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
T9: Archive,
T10: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
T8::Archived: Deserialize<T8, D>,
T9::Archived: Deserialize<T9, D>,
T10::Archived: Deserialize<T10, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11), D> for ArchivedTuple12<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived, T8::Archived, T9::Archived, T10::Archived, T11::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
T9: Archive,
T10: Archive,
T11: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
T8::Archived: Deserialize<T8, D>,
T9::Archived: Deserialize<T9, D>,
T10::Archived: Deserialize<T10, D>,
T11::Archived: Deserialize<T11, D>,
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, D> Deserialize<(T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12), D> for ArchivedTuple13<T0::Archived, T1::Archived, T2::Archived, T3::Archived, T4::Archived, T5::Archived, T6::Archived, T7::Archived, T8::Archived, T9::Archived, T10::Archived, T11::Archived, T12::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
T9: Archive,
T10: Archive,
T11: Archive,
T12: Archive,
T0::Archived: Deserialize<T0, D>,
T1::Archived: Deserialize<T1, D>,
T2::Archived: Deserialize<T2, D>,
T3::Archived: Deserialize<T3, D>,
T4::Archived: Deserialize<T4, D>,
T5::Archived: Deserialize<T5, D>,
T6::Archived: Deserialize<T6, D>,
T7::Archived: Deserialize<T7, D>,
T8::Archived: Deserialize<T8, D>,
T9::Archived: Deserialize<T9, D>,
T10::Archived: Deserialize<T10, D>,
T11::Archived: Deserialize<T11, D>,
T12::Archived: Deserialize<T12, D>,
impl<T, D> Deserialize<Bound<T>, D> for ArchivedBound<T::Archived>
impl<T, D> Deserialize<Option<T>, D> for ArchivedOption<T::Archived>
impl<T, D> Deserialize<Box<T>, D> for ArchivedBox<T::Archived>where
T: ArchiveUnsized + LayoutRaw + ?Sized,
T::Archived: DeserializeUnsized<T, D>,
D: Fallible + ?Sized,
D::Error: Source,
Available on crate feature
alloc
only.impl<T, D> Deserialize<VecDeque<T>, D> for ArchivedVec<T::Archived>
Available on crate feature
alloc
only.impl<T, D> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor>
Available on crate feature
alloc
only.impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, RcFlavor>
Available on crate feature
alloc
only.impl<T, D> Deserialize<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor>
Available on
target_has_atomic="ptr"
and crate feature alloc
only.impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, ArcFlavor>
Available on
target_has_atomic="ptr"
and crate feature alloc
only.impl<T, D> Deserialize<Vec<T>, D> for ArchivedVec<T::Archived>
Available on crate feature
alloc
only.