gear_core::tasks

Trait TaskHandler

Source
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§

Source

fn pause_program(&mut self, program_id: ProgramId) -> Gas

Pause program action.

Source

fn remove_code(&mut self, code_id: CodeId) -> Gas

Remove code action.

Source

fn remove_from_mailbox(&mut self, user_id: RFM, message_id: MessageId) -> Gas

Remove from mailbox action.

Source

fn remove_from_waitlist( &mut self, program_id: ProgramId, message_id: MessageId, ) -> Gas

Remove from waitlist action.

Source

fn remove_paused_program(&mut self, program_id: ProgramId) -> Gas

Remove paused program action.

Source

fn wake_message(&mut self, program_id: ProgramId, message_id: MessageId) -> Gas

Wake message action.

Source

fn send_dispatch(&mut self, stashed_message_id: SD) -> Gas

Send delayed message to program action.

Source

fn send_user_message( &mut self, stashed_message_id: MessageId, to_mailbox: SUM, ) -> Gas

Send delayed message to user action.

Source

fn remove_gas_reservation( &mut self, program_id: ProgramId, reservation_id: ReservationId, ) -> Gas

Remove gas reservation action.

Source

fn remove_resume_session(&mut self, session_id: u32) -> Gas

Remove data created by resume program session.

Implementors§