pub trait AccountSerialize {
    // Provided method
    fn try_serialize<W: Write>(&self, _writer: &mut W) -> Result<()> { ... }
}
Expand description

A data structure that can be serialized and stored into account storage, i.e. an AccountInfo’s mutable data slice.

Implementors of this trait should ensure that any subsequent usage of the AccountDeserialize trait succeeds if and only if the account is of the correct type.

In most cases, one can use the default implementation provided by the #[account] attribute.

Provided Methods§

source

fn try_serialize<W: Write>(&self, _writer: &mut W) -> Result<()>

Serializes the account data into writer.

Object Safety§

This trait is not object safe.

Implementors§