Trait ActionExt

Source
pub trait ActionExt: Action {
    // Provided methods
    fn signer(&self) -> ActionSigner
       where Self: Seed { ... }
    fn execution_lamports(&self, execution_lamports: u64) -> u64 { ... }
    fn validate_balance(
        account: &AccountLoader<'_, Self>,
        execution_lamports: u64,
    ) -> Result<()>
       where Self: ZeroCopy + Owner + InitSpace { ... }
}
Expand description

Extentsion trait for Action.

Provided Methods§

Source

fn signer(&self) -> ActionSigner
where Self: Seed,

Action signer.

Source

fn execution_lamports(&self, execution_lamports: u64) -> u64

Execution lamports.

Source

fn validate_balance( account: &AccountLoader<'_, Self>, execution_lamports: u64, ) -> Result<()>
where Self: ZeroCopy + Owner + InitSpace,

Validate balance.

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.

Implementors§

Source§

impl<T: Action> ActionExt for T