pub trait Entity{
const SIZE: usize;
const MAGIC: u8;
const DATA_SIZE: usize = _;
// Provided methods
fn serialize_to(&self, data: &mut [u8]) -> ProgramResult { ... }
fn deserialize_from(data: &[u8]) -> Result<Self, ProgramError> { ... }
fn is_initialized(data: &[u8]) -> bool { ... }
}Required Associated Constants§
Provided Associated Constants§
Provided Methods§
fn serialize_to(&self, data: &mut [u8]) -> ProgramResult
fn deserialize_from(data: &[u8]) -> Result<Self, ProgramError>
fn is_initialized(data: &[u8]) -> bool
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.