Trait clockwork_queue_program::objects::QueueAccount
source · [−]pub trait QueueAccount {
fn pubkey(&self) -> Pubkey;
fn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<()>;
fn crank(
&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,
data_hash: Option<u64>,
remaining_accounts: &[AccountInfo<'_>]
) -> Result<()>;
fn realloc(&mut self) -> Result<()>;
fn update(&mut self, settings: QueueSettings) -> Result<()>;
}
Expand description
Trait for reading and writing to a queue account.
Required Methods
sourcefn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<()>
fn init(
&mut self,
authority: Pubkey,
id: String,
kickoff_instruction: InstructionData,
trigger: Trigger
) -> Result<()>
Initialize the account to hold queue object.
sourcefn crank(
&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 crank(
&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<()>
Crank the queue. Call out to the target program and parse the response for a next instruction.