Trait Serialize
pub trait Serialize<S>: Archive{
// Required method
fn serialize(
&self,
serializer: &mut S,
) -> Result<Self::Resolver, <S as Fallible>::Error> ⓘ;
}
Available on crate feature
dep_rkyv
only.Expand description
Converts a type to its archived form.
Objects perform any supportive serialization during
serialize
. For types that reference nonlocal
(pointed-to) data, this is when that data must be serialized to the output.
These types will need to bound S
to implement
Writer
and any other required traits (e.g.
Sharing
). They should then serialize their
dependencies during serialize
.
See Archive
for examples of implementing Serialize
.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
§impl<T0, T1, T2, S> Serialize<S> for (T0, T1, T2)
impl<T0, T1, T2, S> Serialize<S> for (T0, T1, T2)
§impl<T0, T1, T2, T3, S> Serialize<S> for (T0, T1, T2, T3)
impl<T0, T1, T2, T3, S> Serialize<S> for (T0, T1, T2, T3)
§impl<T0, T1, T2, T3, T4, S> Serialize<S> for (T0, T1, T2, T3, T4)
impl<T0, T1, T2, T3, T4, S> Serialize<S> for (T0, T1, T2, T3, T4)
§impl<T0, T1, T2, T3, T4, T5, S> Serialize<S> for (T0, T1, T2, T3, T4, T5)
impl<T0, T1, T2, T3, T4, T5, S> Serialize<S> for (T0, T1, T2, T3, T4, T5)
§impl<T0, T1, T2, T3, T4, T5, T6, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6)
impl<T0, T1, T2, T3, T4, T5, T6, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7)
impl<T0, T1, T2, T3, T4, T5, T6, T7, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
§impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, S> Serialize<S> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
Implementors§
impl<K, S> Serialize<S> for BTreeSet<K>
impl<K, S, RS> Serialize<S> for devela::all::HashSet<K, RS>
impl<K, S, RS> Serialize<S> for devela::_dep::_std::collections::HashSet<K, RS>
impl<K, V, S> Serialize<S> for BTreeMap<K, V>
impl<K, V, S, RandomState> Serialize<S> for devela::all::HashMap<K, V, RandomState>
impl<K, V, S, RandomState> Serialize<S> for devela::_dep::_std::collections::HashMap<K, V, RandomState>
impl<S> Serialize<S> for IpAddr
impl<S> Serialize<S> for SocketAddr
impl<S> Serialize<S> for Ipv4Addr
impl<S> Serialize<S> for Ipv6Addr
impl<S> Serialize<S> for SocketAddrV4
impl<S> Serialize<S> for SocketAddrV6
impl<S> Serialize<S> for NonZero<i8>
impl<S> Serialize<S> for NonZero<i16>
impl<S> Serialize<S> for NonZero<i32>
impl<S> Serialize<S> for NonZero<i64>
impl<S> Serialize<S> for NonZero<i128>
impl<S> Serialize<S> for NonZero<isize>
impl<S> Serialize<S> for NonZero<u8>
impl<S> Serialize<S> for NonZero<u16>
impl<S> Serialize<S> for NonZero<u32>
impl<S> Serialize<S> for NonZero<u64>
impl<S> Serialize<S> for NonZero<u128>
impl<S> Serialize<S> for NonZero<usize>
impl<S> Serialize<S> for PhantomPinned
impl<S> Serialize<S> for RangeFull
impl<S> Serialize<S> for String
impl<S> Serialize<S> for CString
impl<S> Serialize<S> for Duration
impl<S> Serialize<S> for NonZeroI16_be
impl<S> Serialize<S> for NonZeroI16_le
impl<S> Serialize<S> for NonZeroI32_be
impl<S> Serialize<S> for NonZeroI32_le
impl<S> Serialize<S> for NonZeroI64_be
impl<S> Serialize<S> for NonZeroI64_le
impl<S> Serialize<S> for NonZeroI128_be
impl<S> Serialize<S> for NonZeroI128_le
impl<S> Serialize<S> for NonZeroU16_be
impl<S> Serialize<S> for NonZeroU16_le
impl<S> Serialize<S> for NonZeroU32_be
impl<S> Serialize<S> for NonZeroU32_le
impl<S> Serialize<S> for NonZeroU64_be
impl<S> Serialize<S> for NonZeroU64_le
impl<S> Serialize<S> for NonZeroU128_be
impl<S> Serialize<S> for NonZeroU128_le
impl<S> Serialize<S> for char_be
impl<S> Serialize<S> for char_le
impl<S> Serialize<S> for f32_be
impl<S> Serialize<S> for f32_le
impl<S> Serialize<S> for f64_be
impl<S> Serialize<S> for f64_le
impl<S> Serialize<S> for i16_be
impl<S> Serialize<S> for i16_le
impl<S> Serialize<S> for i32_be
impl<S> Serialize<S> for i32_le
impl<S> Serialize<S> for i64_be
impl<S> Serialize<S> for i64_le
impl<S> Serialize<S> for i128_be
impl<S> Serialize<S> for i128_le
impl<S> Serialize<S> for u16_be
impl<S> Serialize<S> for u16_le
impl<S> Serialize<S> for u32_be
impl<S> Serialize<S> for u32_le
impl<S> Serialize<S> for u64_be
impl<S> Serialize<S> for u64_le
impl<S> Serialize<S> for u128_be
impl<S> Serialize<S> for u128_le
impl<S, BK, BV, K, V> Serialize<S> for EntryAdapter<BK, BV, K, V>
impl<S, F, W> Serialize<S> for With<F, W>
impl<T, S> Serialize<S> for Option<T>
impl<T, S> Serialize<S> for Bound<T>
impl<T, S> Serialize<S> for Box<T>
impl<T, S> Serialize<S> for ManuallyDrop<T>
impl<T, S> Serialize<S> for PhantomData<T>
impl<T, S> Serialize<S> for Range<T>
impl<T, S> Serialize<S> for RangeFrom<T>
impl<T, S> Serialize<S> for RangeInclusive<T>
impl<T, S> Serialize<S> for RangeTo<T>
impl<T, S> Serialize<S> for RangeToInclusive<T>
impl<T, S> Serialize<S> for Rc<T>
impl<T, S> Serialize<S> for devela::all::RcWeak<T>
impl<T, S> Serialize<S> for Vec<T>
impl<T, S> Serialize<S> for VecDeque<T>
impl<T, S> Serialize<S> for Arc<T>
impl<T, S> Serialize<S> for devela::work::ArcWeak<T>
impl<T, U, S> Serialize<S> for Result<T, U>
impl<__S: Fallible + ?Sized> Serialize<__S> for Boxed
Available on crate feature
alloc
only.