pub enum ScheduledTask<RFM, SD, SUM> {
PauseProgram(ProgramId),
RemoveCode(CodeId),
RemoveFromMailbox(RFM, MessageId),
RemoveFromWaitlist(ProgramId, MessageId),
RemovePausedProgram(ProgramId),
WakeMessage(ProgramId, MessageId),
SendDispatch(SD),
SendUserMessage {
message_id: MessageId,
to_mailbox: SUM,
},
RemoveGasReservation(ProgramId, ReservationId),
RemoveResumeSession(u32),
}
Expand description
Scheduled task sense and required data for processing action.
CAUTION: NEVER ALLOW ScheduledTask
BE A BIG DATA.
To avoid redundant migrations only append new variant(s) to the enum
with an explicit corresponding scale codec index.
Variants§
PauseProgram(ProgramId)
Pause program as out of rent one.
RemoveCode(CodeId)
Remove code from code storage as out of rent one.
RemoveFromMailbox(RFM, MessageId)
Remove message from mailbox as out of rent one.
RemoveFromWaitlist(ProgramId, MessageId)
Remove message from waitlist as out of rent one.
RemovePausedProgram(ProgramId)
Remove paused program as dead one (issue #1014).
WakeMessage(ProgramId, MessageId)
Delayed wake of the message at concrete block.
SendDispatch(SD)
Delayed message to program sending.
The message itself stored in DispatchStash.
SendUserMessage
Delayed message to user sending.
The message itself stored in DispatchStash.
Fields
to_mailbox: SUM
Should it be inserted into users mailbox.
RemoveGasReservation(ProgramId, ReservationId)
Remove gas reservation.
RemoveResumeSession(u32)
Remove resume program session.
Implementations§
Source§impl<RFM, SD, SUM> ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> ScheduledTask<RFM, SD, SUM>
Sourcepub fn process_with(self, handler: &mut impl TaskHandler<RFM, SD, SUM>) -> Gas
pub fn process_with(self, handler: &mut impl TaskHandler<RFM, SD, SUM>) -> Gas
Processing function of current task with given handler.
Trait Implementations§
Source§impl<RFM: Clone, SD: Clone, SUM: Clone> Clone for ScheduledTask<RFM, SD, SUM>
impl<RFM: Clone, SD: Clone, SUM: Clone> Clone for ScheduledTask<RFM, SD, SUM>
Source§fn clone(&self) -> ScheduledTask<RFM, SD, SUM>
fn clone(&self) -> ScheduledTask<RFM, SD, SUM>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more