Trait rkyv::with::DeserializeWith

source ·
pub trait DeserializeWith<F: ?Sized, T, D: Fallible + ?Sized> {
    // Required method
    fn deserialize_with(field: &F, deserializer: &mut D) -> Result<T, D::Error>;
}
Expand description

A variant of Deserialize for “with” types.

See ArchiveWith for more details.

Required Methods§

source

fn deserialize_with(field: &F, deserializer: &mut D) -> Result<T, D::Error>

Deserializes the field type F using the given deserializer.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, D> DeserializeWith<ArchivedCString, Cow<'a, CStr>, D> for AsOwned
where D: Fallible + ?Sized, D::Error: Source,

Available on crate feature std only.
source§

impl<'a, D> DeserializeWith<ArchivedString, Cow<'a, str>, D> for AsOwned
where D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<'a, T, D> DeserializeWith<ArchivedVec<<T as Archive>::Archived>, Cow<'a, [T]>, D> for AsOwned
where T: Archive + Clone, T::Archived: Deserialize<T, D>, D: Fallible + ?Sized, D::Error: Source,

Available on crate feature alloc only.
source§

impl<A, B, K, V, D> DeserializeWith<ArchivedBTreeMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>, BTreeMap<K, V>, D> for MapKV<A, B>
where A: ArchiveWith<K> + DeserializeWith<<A as ArchiveWith<K>>::Archived, K, D>, B: ArchiveWith<V> + DeserializeWith<<B as ArchiveWith<V>>::Archived, V, D>, K: Ord, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<A, B, K, V, D, S> DeserializeWith<ArchivedHashMap<<A as ArchiveWith<K>>::Archived, <B as ArchiveWith<V>>::Archived>, HashMap<K, V, S>, D> for MapKV<A, B>
where A: ArchiveWith<K> + DeserializeWith<<A as ArchiveWith<K>>::Archived, K, D>, B: ArchiveWith<V> + DeserializeWith<<B as ArchiveWith<V>>::Archived, V, D>, K: Ord + Hash + Eq, D: Fallible + ?Sized, S: Default + BuildHasher,

Available on crate feature std only.
source§

impl<A, O, D> DeserializeWith<ArchivedOption<<A as ArchiveWith<O>>::Archived>, Option<O>, D> for Map<A>
where D: Fallible + ?Sized, A: ArchiveWith<O> + DeserializeWith<<A as ArchiveWith<O>>::Archived, O, D>,

source§

impl<A, O, D> DeserializeWith<ArchivedVec<<A as ArchiveWith<O>>::Archived>, Vec<O>, D> for Map<A>
where A: ArchiveWith<O> + DeserializeWith<<A as ArchiveWith<O>>::Archived, O, D>, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<A, T, D> DeserializeWith<A, Rc<T>, D> for Unshare
where A: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<A, T, D> DeserializeWith<A, Arc<T>, D> for Unshare
where A: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature alloc and target_has_atomic="ptr" only.
source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI8, Option<NonZero<i8>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI16, Option<NonZero<i16>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI32, Option<NonZero<i32>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI32, Option<NonZero<isize>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI64, Option<NonZero<i64>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroI128, Option<NonZero<i128>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU8, Option<NonZero<u8>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU16, Option<NonZero<u16>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<u32>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU32, Option<NonZero<usize>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU64, Option<NonZero<u64>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedOptionNonZeroU128, Option<NonZero<u128>>, D> for Niche
where D: Fallible + ?Sized,

source§

impl<D> DeserializeWith<ArchivedString, OsString, D> for AsString
where D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<D> DeserializeWith<ArchivedString, PathBuf, D> for AsString
where D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<D> DeserializeWith<ArchivedDuration, SystemTime, D> for AsUnixTime
where D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<D, SO> DeserializeWith<bool, AtomicBool, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64" only.
source§

impl<D, SO> DeserializeWith<i8, AtomicI8, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64" only.
source§

impl<D, SO> DeserializeWith<u8, AtomicU8, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64" only.
source§

impl<D, SO> DeserializeWith<i16_be, AtomicI16_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i16_le, AtomicI16, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i16_le, AtomicI16_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i32_le, AtomicI32, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i32_le, AtomicIsize, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i32_le, AtomicI32_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i32_le, AtomicI32_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i64_le, AtomicI64, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i64_le, AtomicI64_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<i64_le, AtomicI64_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u16_be, AtomicU16_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u16_le, AtomicU16, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u16_le, AtomicU16_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u32_le, AtomicU32, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u32_le, AtomicUsize, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u32_le, AtomicU32_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u32_le, AtomicU32_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u64_le, AtomicU64, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u64_le, AtomicU64_be, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, SO> DeserializeWith<u64_le, AtomicU64_le, D> for AtomicLoad<SO>
where D: Fallible + ?Sized,

Available on (target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") and (target_has_atomic="8" or target_has_atomic="16" or target_has_atomic="32" or target_has_atomic="64") only.
source§

impl<D, const A: usize> DeserializeWith<ArchivedVec<u8>, AlignedVec<A>, D> for AsVec
where D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<F, D> DeserializeWith<<F as Archive>::Archived, Cell<F>, D> for Unsafe
where F: Archive, F::Archived: Deserialize<F, D>, D: Fallible + ?Sized,

source§

impl<F, D> DeserializeWith<<F as Archive>::Archived, UnsafeCell<F>, D> for Unsafe
where F: Archive, F::Archived: Deserialize<F, D>, D: Fallible + ?Sized,

source§

impl<F, D> DeserializeWith<ArchivedBox<<F as Archive>::Archived>, F, D> for AsBox
where F: Archive, F::Archived: Deserialize<F, D>, D: Fallible + ?Sized,

source§

impl<F, T, D> DeserializeWith<F, Mutex<T>, D> for Lock
where F: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<F, T, D> DeserializeWith<F, RwLock<T>, D> for Lock
where F: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<F, T, D> DeserializeWith<F, T, D> for Identity
where F: Deserialize<T, D>, D: Fallible + ?Sized,

source§

impl<F: Default, D: Fallible + ?Sized> DeserializeWith<(), F, D> for Skip

source§

impl<K, V, D> DeserializeWith<ArchivedVec<Entry<<K as Archive>::Archived, <V as Archive>::Archived>>, BTreeMap<K, V>, D> for AsVec
where K: Archive + Ord, V: Archive, K::Archived: Deserialize<K, D>, V::Archived: Deserialize<V, D>, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<K, V, H, D> DeserializeWith<ArchivedVec<Entry<<K as Archive>::Archived, <V as Archive>::Archived>>, HashMap<K, V, H>, D> for AsVec
where K: Archive + Hash + Eq, V: Archive, K::Archived: Deserialize<K, D>, V::Archived: Deserialize<V, D>, H: BuildHasher + Default, D: Fallible + ?Sized,

Available on crate feature std only.
source§

impl<T, D> DeserializeWith<<T as Archive>::Archived, T, D> for AsOwned
where T: Archive + Clone, T::Archived: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<T, D> DeserializeWith<ArchivedOptionBox<<T as ArchiveUnsized>::Archived>, Option<Box<T>>, D> for Niche

Available on crate feature alloc only.
source§

impl<T, D> DeserializeWith<ArchivedVec<<T as Archive>::Archived>, BTreeSet<T>, D> for AsVec
where T: Archive + Ord, T::Archived: Deserialize<T, D>, D: Fallible + ?Sized,

Available on crate feature alloc only.
source§

impl<T, H, D> DeserializeWith<ArchivedVec<<T as Archive>::Archived>, HashSet<T, H>, D> for AsVec
where T: Archive + Hash + Eq, T::Archived: Deserialize<T, D>, H: BuildHasher + Default, D: Fallible + ?Sized,

Available on crate feature std only.