Trait mango_v4::state::DynamicHeader
source · [−]pub trait DynamicHeader: Sized {
fn from_bytes(dynamic_data: &[u8]) -> Result<Self>;
fn initialize(dynamic_data: &mut [u8]) -> Result<()>;
}
Expand description
Header is created by scanning and parsing the dynamic portion of the account. This stores useful information e.g. offsets to easily seek into dynamic content.
Required Methods
sourcefn from_bytes(dynamic_data: &[u8]) -> Result<Self>
fn from_bytes(dynamic_data: &[u8]) -> Result<Self>
Builds header by scanning and parsing the dynamic portion of the account.
sourcefn initialize(dynamic_data: &mut [u8]) -> Result<()>
fn initialize(dynamic_data: &mut [u8]) -> Result<()>
initializes a header on the dynamic portion of a new account