Trait RawType

Source
pub trait RawType {
    const LEN: usize;
}
Expand description

Marker trait for types that can cast from a raw pointer.

It is up to the type implementing this trait to guarantee that the cast is safe, i.e., that the fields of the type are well aligned and there are no padding bytes.

Required Associated Constants§

Source

const LEN: usize

The length of the type.

This must be equal to the size of each individual field in the type.

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§

Source§

impl RawType for Account

Source§

const LEN: usize = 165usize

Source§

impl RawType for Mint

Source§

const LEN: usize = 82usize

Source§

impl RawType for Multisig

Source§

const LEN: usize = 355usize