SizedRecord

Trait SizedRecord 

Source
pub trait SizedRecord<Layout> {
    // Required methods
    fn size(layout: &Layout) -> usize;
    fn alignment(layout: &Layout) -> usize;
}
Expand description

SizedRecord is a trait that provides additional information about the size and alignment requirements of a record. Should be implemented on RecordMut types

Required Methods§

Source

fn size(layout: &Layout) -> usize

The minimal size in bytes that the RecordMut requires to be properly constructed given the layout.

Source

fn alignment(layout: &Layout) -> usize

The minimal alignment required for the RecordMut to be properly constructed given the layout.

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§

Source§

impl<Layout, Record> SizedRecord<Layout> for &mut Record
where Record: Sized,

Source§

fn size(_layout: &Layout) -> usize

Source§

fn alignment(_layout: &Layout) -> usize

Implementors§