pub trait ProgramExt: Program {
// Provided methods
fn instruction(&self, data: Vec<u8>) -> InstructionBuilder<'_, Self>
where Self: Sized { ... }
fn anchor_instruction(
&self,
args: impl InstructionData,
) -> InstructionBuilder<'_, Self>
where Self: Sized { ... }
fn anchor_accounts(
&self,
accounts: impl ToAccountMetas,
convert_optional: bool,
) -> Vec<AccountMeta>
where Self: Id { ... }
}Expand description
Extension trait for Program.
Provided Methods§
Sourcefn instruction(&self, data: Vec<u8>) -> InstructionBuilder<'_, Self>where
Self: Sized,
fn instruction(&self, data: Vec<u8>) -> InstructionBuilder<'_, Self>where
Self: Sized,
Create an InstructionBuilder
Sourcefn anchor_instruction(
&self,
args: impl InstructionData,
) -> InstructionBuilder<'_, Self>where
Self: Sized,
fn anchor_instruction(
&self,
args: impl InstructionData,
) -> InstructionBuilder<'_, Self>where
Self: Sized,
Create InstructionBuilder with InstructionData.
Sourcefn anchor_accounts(
&self,
accounts: impl ToAccountMetas,
convert_optional: bool,
) -> Vec<AccountMeta>where
Self: Id,
fn anchor_accounts(
&self,
accounts: impl ToAccountMetas,
convert_optional: bool,
) -> Vec<AccountMeta>where
Self: Id,
Convert to account metas.
If convert_optional is true, read-only non-signer accounts with
the default program ID as pubkey will be replaced with the current
program ID.
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.