Struct poc_framework::LocalEnvironmentBuilder [−][src]
pub struct LocalEnvironmentBuilder { /* fields omitted */ }Implementations
Adds the account into the environment.
Reads the program from the path and add it at the address into the environment.
pub fn add_account_with_data(
&mut self,
pubkey: Pubkey,
owner: Pubkey,
data: &[u8],
executable: bool
) -> &mut Self
pub fn add_account_with_lamports(
&mut self,
pubkey: Pubkey,
owner: Pubkey,
lamports: u64
) -> &mut Self
pub fn add_account_with_packable<P: Pack>(
&mut self,
pubkey: Pubkey,
owner: Pubkey,
data: P
) -> &mut Self
pub fn add_token_mint(
&mut self,
pubkey: Pubkey,
mint_authority: Option<Pubkey>,
supply: u64,
decimals: u8,
freeze_authority: Option<Pubkey>
) -> &mut Self
pub fn add_account_with_tokens(
&mut self,
pubkey: Pubkey,
mint: Pubkey,
owner: Pubkey,
amount: u64
) -> &mut Self
pub fn add_associated_account_with_tokens(
&mut self,
owner: Pubkey,
mint: Pubkey,
amount: u64
) -> &mut Self
Clone an account from a cluster using the given rpc client. Use [clone_upgradable_program_from_cluster] if you want to clone a upgradable program, as this requires multiple accounts.
Clone multiple accounts from a cluster using the given rpc client.
pub fn clone_upgradable_program_from_cluster(
&mut self,
client: &RpcClient,
pubkey: Pubkey
) -> &mut Self
pub fn clone_upgradable_program_from_cluster(
&mut self,
client: &RpcClient,
pubkey: Pubkey
) -> &mut Self
Clones all accounts required to execute the given executable program from the cluster, using the given rpc client.
Finalizes the environment.
Auto Trait Implementations
impl RefUnwindSafe for LocalEnvironmentBuilder
impl Send for LocalEnvironmentBuilder
impl Sync for LocalEnvironmentBuilder
impl Unpin for LocalEnvironmentBuilder
impl UnwindSafe for LocalEnvironmentBuilder
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more