[][src]Trait soak::Columns

pub unsafe trait Columns {
    type Pointers: BorrowMut<[NonNull<u8>]>;

    const SIZES: &'static [usize];
    const ALIGNS: &'static [usize];

    fn dangling() -> Self::Pointers;
}

Layout metadata required to use a struct in a RawTable.

This trait should not normally be implemented by hand. Instead, use #[derive(Columns)]- this will safely generate the appropriate trait impl as well as associated const Fields.

Safety

  • SIZES and ALIGNS must accurately describe Self's fields.
  • Pointers must be a fixed-size array matching SIZES and ALIGNS in length.
  • dangling() must contain ptr::NonNull::dangling().

Associated Types

type Pointers: BorrowMut<[NonNull<u8>]>

A fixed-size array of pointers to field arrays.

Loading content...

Associated Constants

const SIZES: &'static [usize]

The sizes of individual struct elements.

const ALIGNS: &'static [usize]

The alignments of individual struct elements.

Loading content...

Required methods

fn dangling() -> Self::Pointers

An empty value for Self::Pointers.

Loading content...

Implementors

Loading content...