pub trait ThreadAccount {
    fn pubkey(&self) -> Pubkey;
    fn init(
        &mut self,
        authority: Pubkey,
        id: String,
        kickoff_instruction: InstructionData,
        trigger: Trigger
    ) -> Result<()>; fn exec(
        &mut self,
        account_infos: &[AccountInfo<'_>],
        bump: u8,
        fee: &mut Account<'_, Fee>,
        penalty: &mut Account<'_, Penalty>,
        pool: &Account<'_, Pool>,
        signatory: &mut Signer<'_>,
        worker: &Account<'_, Worker>
    ) -> Result<()>; fn kickoff(&mut self, remaining_accounts: &[AccountInfo<'_>]) -> Result<()>; fn realloc(&mut self) -> Result<()>; fn update(&mut self, settings: ThreadSettings) -> Result<()>; }
Expand description

Trait for reading and writing to a thread account.

Required Methods§

source

fn pubkey(&self) -> Pubkey

Get the pubkey of the thread account.

source

fn init(
    &mut self,
    authority: Pubkey,
    id: String,
    kickoff_instruction: InstructionData,
    trigger: Trigger
) -> Result<()>

Initialize the account to hold thread object.

source

fn exec(
    &mut self,
    account_infos: &[AccountInfo<'_>],
    bump: u8,
    fee: &mut Account<'_, Fee>,
    penalty: &mut Account<'_, Penalty>,
    pool: &Account<'_, Pool>,
    signatory: &mut Signer<'_>,
    worker: &Account<'_, Worker>
) -> Result<()>

Execute the next instruction on the thread.

source

fn kickoff(&mut self, remaining_accounts: &[AccountInfo<'_>]) -> Result<()>

source

fn realloc(&mut self) -> Result<()>

Reallocate the memory allocation for the account.

source

fn update(&mut self, settings: ThreadSettings) -> Result<()>

Implementations on Foreign Types§

source§

impl ThreadAccount for Account<'_, Thread>

source§

fn pubkey(&self) -> Pubkey

source§

fn init(
    &mut self,
    authority: Pubkey,
    id: String,
    kickoff_instruction: InstructionData,
    trigger: Trigger
) -> Result<()>

source§

fn exec(
    &mut self,
    account_infos: &[AccountInfo<'_>],
    bump: u8,
    fee: &mut Account<'_, Fee>,
    penalty: &mut Account<'_, Penalty>,
    pool: &Account<'_, Pool>,
    signatory: &mut Signer<'_>,
    worker: &Account<'_, Worker>
) -> Result<()>

source§

fn realloc(&mut self) -> Result<()>

source§

fn update(&mut self, settings: ThreadSettings) -> Result<()>

source§

fn kickoff(&mut self, remaining_accounts: &[AccountInfo<'_>]) -> Result<()>

Implementors§