pub trait AccountSerialize {
    fn try_serialize<W: Write>(
        &self,
        writer: &mut W
    ) -> Result<(), ProgramError>; }
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.

Required methods

Serializes the account data into writer.

Implementors