Trait rkyv::Deserialize [−][src]
pub trait Deserialize<T, D: Fallible + ?Sized> { 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. SharedDeserializeRegistry
).
This can be derived with Deserialize
.
Required methods
fn 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
impl<D: Fallible + ?Sized, T11: Archive, T10: Archive, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T11, T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T11::Archived, T10::Archived, T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T11::Archived: Deserialize<T11, D>,
T10::Archived: Deserialize<T10, D>,
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T11: Archive, T10: Archive, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T11, T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T11::Archived, T10::Archived, T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T11::Archived: Deserialize<T11, D>,
T10::Archived: Deserialize<T10, D>,
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T10: Archive, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T10::Archived, T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T10::Archived: Deserialize<T10, D>,
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T10: Archive, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T10, T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T10::Archived, T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T10::Archived: Deserialize<T10, D>,
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T9: Archive, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T9, T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T9::Archived, T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T9::Archived: Deserialize<T9, D>,
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T8: Archive, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T8, T7, T6, T5, T4, T3, T2, T1, T0), D> for (T8::Archived, T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T8::Archived: Deserialize<T8, D>,
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T7, T6, T5, T4, T3, T2, T1, T0), D> for (T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T7: Archive, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T7, T6, T5, T4, T3, T2, T1, T0), D> for (T7::Archived, T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T7::Archived: Deserialize<T7, D>,
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T6, T5, T4, T3, T2, T1, T0), D> for (T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T6: Archive, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T6, T5, T4, T3, T2, T1, T0), D> for (T6::Archived, T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T6::Archived: Deserialize<T6, D>,
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T5, T4, T3, T2, T1, T0), D> for (T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T5: Archive, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T5, T4, T3, T2, T1, T0), D> for (T5::Archived, T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T5::Archived: Deserialize<T5, D>,
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T4, T3, T2, T1, T0), D> for (T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T4: Archive, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T4, T3, T2, T1, T0), D> for (T4::Archived, T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T4::Archived: Deserialize<T4, D>,
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T3, T2, T1, T0), D> for (T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T3: Archive, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T3, T2, T1, T0), D> for (T3::Archived, T2::Archived, T1::Archived, T0::Archived) where
T3::Archived: Deserialize<T3, D>,
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T2, T1, T0), D> for (T2::Archived, T1::Archived, T0::Archived) where
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
impl<D: Fallible + ?Sized, T2: Archive, T1: Archive, T0: Archive> Deserialize<(T2, T1, T0), D> for (T2::Archived, T1::Archived, T0::Archived) where
T2::Archived: Deserialize<T2, D>,
T1::Archived: Deserialize<T1, D>,
T0::Archived: Deserialize<T0, D>,
Implementors
impl<D: Fallible + ?Sized> Deserialize<String, D> for ArchivedString where
str: DeserializeUnsized<str, D>,
impl<D: Fallible + ?Sized> Deserialize<CString, D> for Archived<CString> where
CStr: DeserializeUnsized<CStr, D>,
impl<F, W, T, D: ?Sized> Deserialize<With<T, W>, D> for F where
F: ?Sized,
W: DeserializeWith<F, T, D>,
D: Fallible,
impl<K, D: ?Sized> Deserialize<BTreeSet<K>, D> for ArchivedBTreeSet<K::Archived> where
K: Archive + Ord,
K::Archived: Deserialize<K, D> + Ord,
D: Fallible,
impl<K, D: ?Sized> Deserialize<HashSet<K, RandomState>, D> for ArchivedHashSet<K::Archived> where
K: Archive + Hash + Eq,
K::Archived: Deserialize<K, D> + Hash + Eq,
D: Fallible,
impl<K: Archive + Ord, V: Archive, D: Fallible + ?Sized> Deserialize<BTreeMap<K, V>, D> for ArchivedBTreeMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Ord,
V::Archived: Deserialize<V, D>,
impl<K: Archive + Hash + Eq, V: Archive, D: Fallible + ?Sized, S: Default + BuildHasher> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<K::Archived, V::Archived> where
K::Archived: Deserialize<K, D> + Hash + Eq,
V::Archived: Deserialize<V, D>,
impl<T, D: ?Sized> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, RcFlavor> where
T: Archive + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry,
impl<T, D: ?Sized> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, ArcFlavor> where
T: Archive + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry,
impl<T, D: ?Sized> Deserialize<RangeInclusive<T>, D> for Archived<RangeInclusive<T>> where
T: Archive,
T::Archived: Deserialize<T, D>,
D: Fallible,
impl<T, D: ?Sized> Deserialize<RangeToInclusive<T>, D> for Archived<RangeToInclusive<T>> where
T: Archive,
T::Archived: Deserialize<T, D>,
D: Fallible,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Option<T>, D> for ArchivedOption<T::Archived> where
T::Archived: Deserialize<T, D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Vec<T, Global>, D> for ArchivedVec<T::Archived> where
[T::Archived]: DeserializeUnsized<[T], D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Range<T>, D> for Archived<Range<T>> where
T::Archived: Deserialize<T, D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<RangeFrom<T>, D> for Archived<RangeFrom<T>> where
T::Archived: Deserialize<T, D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<RangeTo<T>, D> for Archived<RangeTo<T>> where
T::Archived: Deserialize<T, D>,
impl<T: ArchiveUnsized + ?Sized + 'static, D: SharedDeserializeRegistry + ?Sized> Deserialize<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor> where
T::Archived: DeserializeUnsized<T, D>,
impl<T: ?Sized, D: ?Sized> Deserialize<Box<T, Global>, D> for ArchivedBox<T::Archived> where
T: ArchiveUnsized,
T::Archived: DeserializeUnsized<T, D>,
D: Fallible,
impl<T: ?Sized, D: ?Sized> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor> where
T: ArchiveUnsized + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry,