pub trait AccountSerialize {
    // Provided method
    fn try_serialize<W>(&self, _writer: &mut W) -> Result<(), Error>
       where W: Write { ... }
}
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§

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

Serializes the account data into writer.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl AccountSerialize for Mint

§

impl AccountSerialize for TokenAccount

Implementors§