pub trait TaskHandler<RFM, SD, SUM> {
// Required methods
fn pause_program(&mut self, program_id: ProgramId) -> Gas;
fn remove_code(&mut self, code_id: CodeId) -> Gas;
fn remove_from_mailbox(
&mut self,
user_id: RFM,
message_id: MessageId,
) -> Gas;
fn remove_from_waitlist(
&mut self,
program_id: ProgramId,
message_id: MessageId,
) -> Gas;
fn remove_paused_program(&mut self, program_id: ProgramId) -> Gas;
fn wake_message(
&mut self,
program_id: ProgramId,
message_id: MessageId,
) -> Gas;
fn send_dispatch(&mut self, stashed_message_id: SD) -> Gas;
fn send_user_message(
&mut self,
stashed_message_id: MessageId,
to_mailbox: SUM,
) -> Gas;
fn remove_gas_reservation(
&mut self,
program_id: ProgramId,
reservation_id: ReservationId,
) -> Gas;
fn remove_resume_session(&mut self, session_id: u32) -> Gas;
}
Expand description
Task handler trait for dealing with required tasks.
Required Methods§
Sourcefn pause_program(&mut self, program_id: ProgramId) -> Gas
fn pause_program(&mut self, program_id: ProgramId) -> Gas
Pause program action.
Sourcefn remove_code(&mut self, code_id: CodeId) -> Gas
fn remove_code(&mut self, code_id: CodeId) -> Gas
Remove code action.
Sourcefn remove_from_mailbox(&mut self, user_id: RFM, message_id: MessageId) -> Gas
fn remove_from_mailbox(&mut self, user_id: RFM, message_id: MessageId) -> Gas
Remove from mailbox action.
Sourcefn remove_from_waitlist(
&mut self,
program_id: ProgramId,
message_id: MessageId,
) -> Gas
fn remove_from_waitlist( &mut self, program_id: ProgramId, message_id: MessageId, ) -> Gas
Remove from waitlist action.
Sourcefn remove_paused_program(&mut self, program_id: ProgramId) -> Gas
fn remove_paused_program(&mut self, program_id: ProgramId) -> Gas
Remove paused program action.
Sourcefn wake_message(&mut self, program_id: ProgramId, message_id: MessageId) -> Gas
fn wake_message(&mut self, program_id: ProgramId, message_id: MessageId) -> Gas
Wake message action.
Sourcefn send_dispatch(&mut self, stashed_message_id: SD) -> Gas
fn send_dispatch(&mut self, stashed_message_id: SD) -> Gas
Send delayed message to program action.
Sourcefn send_user_message(
&mut self,
stashed_message_id: MessageId,
to_mailbox: SUM,
) -> Gas
fn send_user_message( &mut self, stashed_message_id: MessageId, to_mailbox: SUM, ) -> Gas
Send delayed message to user action.
Sourcefn remove_gas_reservation(
&mut self,
program_id: ProgramId,
reservation_id: ReservationId,
) -> Gas
fn remove_gas_reservation( &mut self, program_id: ProgramId, reservation_id: ReservationId, ) -> Gas
Remove gas reservation action.
Sourcefn remove_resume_session(&mut self, session_id: u32) -> Gas
fn remove_resume_session(&mut self, session_id: u32) -> Gas
Remove data created by resume program session.