Struct ErasedEncoderEntry
pub struct ErasedEncoderEntry(/* private fields */);Expand description
An type-erased version of EncoderEntry, for use in a
StructEncodeMetadata::ENCODERS table.
Implementations§
§impl ErasedEncoderEntry
 
impl ErasedEncoderEntry
pub unsafe fn write_field<R>(
    &self,
    field: *mut u8,
    writer: FieldWriter<'_, '_, R>,
)
pub unsafe fn write_field<R>( &self, field: *mut u8, writer: FieldWriter<'_, '_, R>, )
Writes a value to a field using the encoder, taking ownership of field.
§Safety
The caller must ensure that field points to a valid object of type T, and
that the encoder is correct for T and R.
pub unsafe fn compute_size_field<R>(
    &self,
    field: *mut u8,
    sizer: FieldSizer<'_>,
)
pub unsafe fn compute_size_field<R>( &self, field: *mut u8, sizer: FieldSizer<'_>, )
Computes the size of a field using the encoder.
§Safety
The caller must ensure that field points to a valid object of type T, and
that the encoder is correct for T and R.
Trait Implementations§
§impl Clone for ErasedEncoderEntry
 
impl Clone for ErasedEncoderEntry
§fn clone(&self) -> ErasedEncoderEntry
 
fn clone(&self) -> ErasedEncoderEntry
Returns a duplicate 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 more§impl Debug for ErasedEncoderEntry
 
impl Debug for ErasedEncoderEntry
impl Copy for ErasedEncoderEntry
impl Send for ErasedEncoderEntry
impl Sync for ErasedEncoderEntry
Auto Trait Implementations§
impl Freeze for ErasedEncoderEntry
impl RefUnwindSafe for ErasedEncoderEntry
impl Unpin for ErasedEncoderEntry
impl UnwindSafe for ErasedEncoderEntry
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