Trait Columns

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

    // Required method
    fn dangling() -> Self::Pointers;
}
Expand description

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.

§Safety

  • Pointers must be a fixed-size array matching Fields::SIZES and Fields::ALIGNS in length.
  • dangling() must contain ptr::NonNull::dangling().

Required Associated Types§

Source

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

A fixed-size array of pointers to field arrays.

Required Methods§

Source

fn dangling() -> Self::Pointers

An empty value for Self::Pointers.

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.

Implementors§