Trait DeserializeUnsized
pub trait DeserializeUnsized<T, D>: ArchivePointee{
// Required methods
unsafe fn deserialize_unsized(
&self,
deserializer: &mut D,
out: *mut T,
) -> Result<(), <D as Fallible>::Error> ⓘ;
fn deserialize_metadata(&self) -> <T as Pointee>::Metadata;
}
Available on crate feature
dep_rkyv
only.Expand description
A counterpart of Deserialize
that’s suitable for unsized types.
Required Methods§
unsafe fn deserialize_unsized(
&self,
deserializer: &mut D,
out: *mut T,
) -> Result<(), <D as Fallible>::Error> ⓘ
unsafe fn deserialize_unsized( &self, deserializer: &mut D, out: *mut T, ) -> Result<(), <D as Fallible>::Error> ⓘ
Deserializes a reference to the given value.
§Safety
out
must be non-null, properly-aligned, and valid for writes. It must
be allocated according to the layout of the deserialized metadata.
fn deserialize_metadata(&self) -> <T as Pointee>::Metadata
fn deserialize_metadata(&self) -> <T as Pointee>::Metadata
Deserializes the metadata for the given type.
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.