pub struct ErasedDecoderEntry(/* private fields */);
Expand description
An entry in a StructDecodeMetadata::DECODERS
table.
Implementations§
Source§impl ErasedDecoderEntry
impl ErasedDecoderEntry
Sourcepub unsafe fn read_field<R>(
&self,
ptr: *mut u8,
init: &mut bool,
reader: FieldReader<'_, '_, R>,
) -> Result<(), Error>
pub unsafe fn read_field<R>( &self, ptr: *mut u8, init: &mut bool, reader: FieldReader<'_, '_, R>, ) -> Result<(), Error>
Reads a field using the decoder metadata.
§Safety
The caller must ensure that the decoder was for resource type R
and
the object type matches what ptr
is pointing to. *init
must be set
if and only if the field is initialized.
Sourcepub unsafe fn default_field(
&self,
ptr: *mut u8,
init: &mut bool,
) -> Result<(), Error>
pub unsafe fn default_field( &self, ptr: *mut u8, init: &mut bool, ) -> Result<(), Error>
Initializes a value to its default state using the decoder metadata.
§Safety
The caller must ensure that the decoder was for the object type matching
what ptr
is pointing to.
Sourcepub unsafe fn drop_field(&self, ptr: *mut u8)
pub unsafe fn drop_field(&self, ptr: *mut u8)
Drops a value in place using the decoder metadata.
§Safety
The caller must ensure that the decoder was for the object type matching
what ptr
is pointing to, and that ptr
is ready to be dropped.
Trait Implementations§
Source§impl Clone for ErasedDecoderEntry
impl Clone for ErasedDecoderEntry
Source§fn clone(&self) -> ErasedDecoderEntry
fn clone(&self) -> ErasedDecoderEntry
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ErasedDecoderEntry
impl Debug for ErasedDecoderEntry
impl Copy for ErasedDecoderEntry
impl Send for ErasedDecoderEntry
impl Sync for ErasedDecoderEntry
Auto Trait Implementations§
impl Freeze for ErasedDecoderEntry
impl RefUnwindSafe for ErasedDecoderEntry
impl Unpin for ErasedDecoderEntry
impl UnwindSafe for ErasedDecoderEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more