pub trait AccountWrapper: ActiveAccount + Default {
// Provided method
fn active() -> Self { ... }
}Expand description
Marker trait for account API wrapper types.
The #[note] and #[tx_script] macros instantiate their entrypoint account parameter
through this trait, so that parameter must be a type implementing it. The ActiveAccount
supertrait guarantees that parameter is usable as the transaction’s active account and keeps
unrelated Default types from satisfying the bound. The #[account(...)] macro implements
both automatically; it is not a sealed capability boundary, so manual implementations are
possible but normally unnecessary.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".