Function swc_plugin::utils::swc_common::plugin::deserialize_from_ptr_into_fallible
source · [−]pub unsafe fn deserialize_from_ptr_into_fallible<W>(
raw_allocated_ptr: *const u8,
raw_allocated_ptr_len: i32
) -> Result<W, Error> where
W: Archive,
<W as Archive>::Archived: Deserialize<W, SharedDeserializeMap>,
Expand description
Deserialize Fallible
struct from raw ptr. This is similar to
deserialize_from_ptr
but for the struct requires bounds to the
SharedSerializeRegistry which cannot be Infallible. Internally this does
not call deserialize with Infallible deserializer, use
SharedDeserializeMap instead.
Safety
This is unsafe by construting bytes slice from raw ptr also deserialize it without slice bound check.