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§
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.