Trait Deserialize
pub trait Deserialize<T, D>{
// Required method
fn deserialize(
&self,
deserializer: &mut D,
) -> Result<T, <D as Fallible>::Error> ⓘ;
}
Available on crate feature
dep_rkyv
only.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§
Implementations on Foreign Types§
§impl<D> Deserialize<bool, D> for bool
impl<D> Deserialize<bool, D> for bool
§impl<D> Deserialize<i8, D> for i8
impl<D> Deserialize<i8, D> for i8
§impl<D> Deserialize<u8, D> for u8
impl<D> Deserialize<u8, D> for u8
§impl<D> Deserialize<(), D> for ()
impl<D> Deserialize<(), D> for ()
Implementors§
impl<D> Deserialize<IpAddr, D> for ArchivedIpAddr
impl<D> Deserialize<SocketAddr, D> for ArchivedSocketAddr
impl<D> Deserialize<char, D> for char_le
impl<D> Deserialize<f32, D> for f32_le
impl<D> Deserialize<f64, D> for f64_le
impl<D> Deserialize<i16, D> for i16_le
impl<D> Deserialize<i32, D> for i32_le
impl<D> Deserialize<i64, D> for i64_le
impl<D> Deserialize<i128, D> for i128_le
impl<D> Deserialize<isize, D> for i32_le
impl<D> Deserialize<u16, D> for u16_le
impl<D> Deserialize<u32, D> for u32_le
impl<D> Deserialize<u64, D> for u64_le
impl<D> Deserialize<u128, D> for u128_le
impl<D> Deserialize<usize, D> for u32_le
impl<D> Deserialize<Ipv4Addr, D> for ArchivedIpv4Addr
impl<D> Deserialize<Ipv6Addr, D> for ArchivedIpv6Addr
impl<D> Deserialize<SocketAddrV4, D> for ArchivedSocketAddrV4
impl<D> Deserialize<SocketAddrV6, D> for ArchivedSocketAddrV6
impl<D> Deserialize<NonZero<i8>, D> for NonZero<i8>
impl<D> Deserialize<NonZero<i16>, D> for NonZeroI16_le
impl<D> Deserialize<NonZero<i32>, D> for NonZeroI32_le
impl<D> Deserialize<NonZero<i64>, D> for NonZeroI64_le
impl<D> Deserialize<NonZero<i128>, D> for NonZeroI128_le
impl<D> Deserialize<NonZero<isize>, D> for NonZeroI32_le
impl<D> Deserialize<NonZero<u8>, D> for NonZero<u8>
impl<D> Deserialize<NonZero<u16>, D> for NonZeroU16_le
impl<D> Deserialize<NonZero<u32>, D> for NonZeroU32_le
impl<D> Deserialize<NonZero<u64>, D> for NonZeroU64_le
impl<D> Deserialize<NonZero<u128>, D> for NonZeroU128_le
impl<D> Deserialize<NonZero<usize>, D> for NonZeroU32_le
impl<D> Deserialize<PhantomPinned, D> for PhantomPinned
impl<D> Deserialize<RangeFull, D> for ArchivedRangeFull
impl<D> Deserialize<String, D> for ArchivedString
impl<D> Deserialize<CString, D> for ArchivedCString
impl<D> Deserialize<Duration, D> for ArchivedDuration
impl<D> Deserialize<NonZeroI16_be, D> for NonZeroI16_be
impl<D> Deserialize<NonZeroI16_le, D> for NonZeroI16_le
impl<D> Deserialize<NonZeroI32_be, D> for NonZeroI32_be
impl<D> Deserialize<NonZeroI32_le, D> for NonZeroI32_le
impl<D> Deserialize<NonZeroI64_be, D> for NonZeroI64_be
impl<D> Deserialize<NonZeroI64_le, D> for NonZeroI64_le
impl<D> Deserialize<NonZeroI128_be, D> for NonZeroI128_be
impl<D> Deserialize<NonZeroI128_le, D> for NonZeroI128_le
impl<D> Deserialize<NonZeroU16_be, D> for NonZeroU16_be
impl<D> Deserialize<NonZeroU16_le, D> for NonZeroU16_le
impl<D> Deserialize<NonZeroU32_be, D> for NonZeroU32_be
impl<D> Deserialize<NonZeroU32_le, D> for NonZeroU32_le
impl<D> Deserialize<NonZeroU64_be, D> for NonZeroU64_be
impl<D> Deserialize<NonZeroU64_le, D> for NonZeroU64_le
impl<D> Deserialize<NonZeroU128_be, D> for NonZeroU128_be
impl<D> Deserialize<NonZeroU128_le, D> for NonZeroU128_le
impl<D> Deserialize<char_be, D> for char_be
impl<D> Deserialize<char_le, D> for char_le
impl<D> Deserialize<f32_be, D> for f32_be
impl<D> Deserialize<f32_le, D> for f32_le
impl<D> Deserialize<f64_be, D> for f64_be
impl<D> Deserialize<f64_le, D> for f64_le
impl<D> Deserialize<i16_be, D> for i16_be
impl<D> Deserialize<i16_le, D> for i16_le
impl<D> Deserialize<i32_be, D> for i32_be
impl<D> Deserialize<i32_le, D> for i32_le
impl<D> Deserialize<i64_be, D> for i64_be
impl<D> Deserialize<i64_le, D> for i64_le
impl<D> Deserialize<i128_be, D> for i128_be
impl<D> Deserialize<i128_le, D> for i128_le
impl<D> Deserialize<u16_be, D> for u16_be
impl<D> Deserialize<u16_le, D> for u16_le
impl<D> Deserialize<u32_be, D> for u32_be
impl<D> Deserialize<u32_le, D> for u32_le
impl<D> Deserialize<u64_be, D> for u64_be
impl<D> Deserialize<u64_le, D> for u64_le
impl<D> Deserialize<u128_be, D> for u128_be
impl<D> Deserialize<u128_le, D> for u128_le
impl<K, D> Deserialize<BTreeSet<K>, D> for ArchivedBTreeSet<<K as Archive>::Archived>
impl<K, D, S> Deserialize<HashSet<K, S>, D> for ArchivedHashSet<<K as Archive>::Archived>
impl<K, D, S> Deserialize<HashSet<K, S>, D> for ArchivedHashSet<<K as Archive>::Archived>
impl<K, V, D> Deserialize<BTreeMap<K, V>, D> for ArchivedBTreeMap<<K as Archive>::Archived, <V as Archive>::Archived>
impl<K, V, D, S> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<<K as Archive>::Archived, <V as Archive>::Archived>
impl<K, V, D, S> Deserialize<HashMap<K, V, S>, D> for ArchivedHashMap<<K as Archive>::Archived, <V as Archive>::Archived>
impl<T0, D> Deserialize<(T0,), D> for ArchivedTuple1<<T0 as Archive>::Archived>
impl<T0, T1, D> Deserialize<(T0, T1), D> for ArchivedTuple2<<T0 as Archive>::Archived, <T1 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
impl<T0, T1, T2, D> Deserialize<(T0, T1, T2), D> for ArchivedTuple3<<T0 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
impl<T0, T1, T2, T3, D> Deserialize<(T0, T1, T2, T3), D> for ArchivedTuple4<<T0 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
impl<T0, T1, T2, T3, T4, D> Deserialize<(T0, T1, T2, T3, T4), D> for ArchivedTuple5<<T0 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
impl<T0, T1, T2, T3, T4, T5, D> Deserialize<(T0, T1, T2, T3, T4, T5), D> for ArchivedTuple6<<T0 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived, <T8 as Archive>::Archived>where
D: Fallible + ?Sized,
T0: Archive,
T1: Archive,
T2: Archive,
T3: Archive,
T4: Archive,
T5: Archive,
T6: Archive,
T7: Archive,
T8: Archive,
<T0 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::Archived: Deserialize<T7, D>,
<T8 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived, <T8 as Archive>::Archived, <T9 as Archive>::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 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::Archived: Deserialize<T7, D>,
<T8 as Archive>::Archived: Deserialize<T8, D>,
<T9 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived, <T8 as Archive>::Archived, <T9 as Archive>::Archived, <T10 as Archive>::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 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::Archived: Deserialize<T7, D>,
<T8 as Archive>::Archived: Deserialize<T8, D>,
<T9 as Archive>::Archived: Deserialize<T9, D>,
<T10 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived, <T8 as Archive>::Archived, <T9 as Archive>::Archived, <T10 as Archive>::Archived, <T11 as Archive>::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 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::Archived: Deserialize<T7, D>,
<T8 as Archive>::Archived: Deserialize<T8, D>,
<T9 as Archive>::Archived: Deserialize<T9, D>,
<T10 as Archive>::Archived: Deserialize<T10, D>,
<T11 as Archive>::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 as Archive>::Archived, <T1 as Archive>::Archived, <T2 as Archive>::Archived, <T3 as Archive>::Archived, <T4 as Archive>::Archived, <T5 as Archive>::Archived, <T6 as Archive>::Archived, <T7 as Archive>::Archived, <T8 as Archive>::Archived, <T9 as Archive>::Archived, <T10 as Archive>::Archived, <T11 as Archive>::Archived, <T12 as Archive>::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 as Archive>::Archived: Deserialize<T0, D>,
<T1 as Archive>::Archived: Deserialize<T1, D>,
<T2 as Archive>::Archived: Deserialize<T2, D>,
<T3 as Archive>::Archived: Deserialize<T3, D>,
<T4 as Archive>::Archived: Deserialize<T4, D>,
<T5 as Archive>::Archived: Deserialize<T5, D>,
<T6 as Archive>::Archived: Deserialize<T6, D>,
<T7 as Archive>::Archived: Deserialize<T7, D>,
<T8 as Archive>::Archived: Deserialize<T8, D>,
<T9 as Archive>::Archived: Deserialize<T9, D>,
<T10 as Archive>::Archived: Deserialize<T10, D>,
<T11 as Archive>::Archived: Deserialize<T11, D>,
<T12 as Archive>::Archived: Deserialize<T12, D>,
impl<T, D> Deserialize<Option<T>, D> for ArchivedOption<<T as Archive>::Archived>
impl<T, D> Deserialize<Bound<T>, D> for ArchivedBound<<T as Archive>::Archived>
impl<T, D> Deserialize<Box<T>, D> for ArchivedBox<<T as ArchiveUnsized>::Archived>where
T: ArchiveUnsized + LayoutRaw + ?Sized,
<T as ArchiveUnsized>::Archived: DeserializeUnsized<T, D>,
D: Fallible + ?Sized,
<D as Fallible>::Error: Source,
impl<T, D> Deserialize<ManuallyDrop<T>, D> for ManuallyDrop<<T as Archive>::Archived>
impl<T, D> Deserialize<PhantomData<T>, D> for PhantomData<T>
impl<T, D> Deserialize<Range<T>, D> for ArchivedRange<<T as Archive>::Archived>
impl<T, D> Deserialize<RangeFrom<T>, D> for ArchivedRangeFrom<<T as Archive>::Archived>
impl<T, D> Deserialize<RangeInclusive<T>, D> for ArchivedRangeInclusive<<T as Archive>::Archived>
impl<T, D> Deserialize<RangeTo<T>, D> for ArchivedRangeTo<<T as Archive>::Archived>
impl<T, D> Deserialize<RangeToInclusive<T>, D> for ArchivedRangeToInclusive<<T as Archive>::Archived>
impl<T, D> Deserialize<Rc<T>, D> for ArchivedRc<<T as ArchiveUnsized>::Archived, RcFlavor>
impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<<T as ArchiveUnsized>::Archived, RcFlavor>
impl<T, D> Deserialize<Vec<T>, D> for ArchivedVec<<T as Archive>::Archived>
impl<T, D> Deserialize<VecDeque<T>, D> for ArchivedVec<<T as Archive>::Archived>
impl<T, D> Deserialize<Arc<T>, D> for ArchivedRc<<T as ArchiveUnsized>::Archived, ArcFlavor>
impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<<T as ArchiveUnsized>::Archived, ArcFlavor>
impl<T, D, F, W> Deserialize<T, D> for With<F, W>
impl<T, N, D> Deserialize<Option<T>, D> for NichedOption<<T as Archive>::Archived, N>
impl<T, U, D> Deserialize<Result<T, U>, D> for ArchivedResult<<T as Archive>::Archived, <U as Archive>::Archived>where
T: Archive,
U: Archive,
D: Fallible + ?Sized,
<T as Archive>::Archived: Deserialize<T, D>,
<U as Archive>::Archived: Deserialize<U, D>,
impl<__D: Fallible + ?Sized> Deserialize<Boxed, __D> for Archived<Boxed>
Available on crate feature
alloc
only.