pub enum ScheduledTask<RFM, SD, SUM> {
RemoveFromMailbox(RFM, MessageId),
RemoveFromWaitlist(ActorId, MessageId),
WakeMessage(ActorId, MessageId),
SendDispatch(SD),
SendUserMessage {
message_id: MessageId,
to_mailbox: SUM,
},
RemoveGasReservation(ActorId, ReservationId),
}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§
RemoveFromMailbox(RFM, MessageId)
Remove message from mailbox as out of rent one.
RemoveFromWaitlist(ActorId, MessageId)
Remove message from waitlist as out of rent one.
WakeMessage(ActorId, 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: SUMShould it be inserted into users mailbox.
RemoveGasReservation(ActorId, ReservationId)
Remove gas reservation.
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>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<RFM: Copy, SD: Copy, SUM: Copy> Copy for ScheduledTask<RFM, SD, SUM>
Source§impl<RFM, SD, SUM> Decode for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> Decode for ScheduledTask<RFM, SD, SUM>
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<RFM, SD, SUM> Encode for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> Encode for ScheduledTask<RFM, SD, SUM>
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<RFM, SD, SUM> EncodeAsType for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> EncodeAsType for ScheduledTask<RFM, SD, SUM>
Source§fn encode_as_type_to<ScaleEncodeResolver: TypeResolver>(
&self,
__encode_as_type_type_id: ScaleEncodeResolver::TypeId,
__encode_as_type_types: &ScaleEncodeResolver,
__encode_as_type_out: &mut Vec<u8>,
) -> Result<(), Error>
fn encode_as_type_to<ScaleEncodeResolver: TypeResolver>( &self, __encode_as_type_type_id: ScaleEncodeResolver::TypeId, __encode_as_type_types: &ScaleEncodeResolver, __encode_as_type_out: &mut Vec<u8>, ) -> Result<(), Error>
Given some
type_id, types, a context and some output target for the SCALE encoded bytes,
attempt to SCALE encode the current value into the type given by type_id.Source§fn encode_as_type<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
fn encode_as_type<R>(
&self,
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Vec<u8>, Error>where
R: TypeResolver,
This is a helper function which internally calls
EncodeAsType::encode_as_type_to. Prefer to
implement that instead.impl<RFM, SD, SUM> EncodeLike for ScheduledTask<RFM, SD, SUM>
impl<RFM: Eq, SD: Eq, SUM: Eq> Eq for ScheduledTask<RFM, SD, SUM>
Source§impl<RFM, SD, SUM> IntoVisitor for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> IntoVisitor for ScheduledTask<RFM, SD, SUM>
Source§type AnyVisitor<ScaleDecodeTypeResolver: TypeResolver> = Visitor<RFM, SD, SUM, ScaleDecodeTypeResolver>
type AnyVisitor<ScaleDecodeTypeResolver: TypeResolver> = Visitor<RFM, SD, SUM, ScaleDecodeTypeResolver>
The visitor type used to decode SCALE encoded bytes to
Self.Source§fn into_visitor<ScaleDecodeTypeResolver: TypeResolver>() -> Self::AnyVisitor<ScaleDecodeTypeResolver>
fn into_visitor<ScaleDecodeTypeResolver: TypeResolver>() -> Self::AnyVisitor<ScaleDecodeTypeResolver>
A means of obtaining this visitor.
Source§impl<RFM, SD, SUM> MaxEncodedLen for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> MaxEncodedLen for ScheduledTask<RFM, SD, SUM>
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
Source§impl<RFM: Ord, SD: Ord, SUM: Ord> Ord for ScheduledTask<RFM, SD, SUM>
impl<RFM: Ord, SD: Ord, SUM: Ord> Ord for ScheduledTask<RFM, SD, SUM>
Source§fn cmp(&self, other: &ScheduledTask<RFM, SD, SUM>) -> Ordering
fn cmp(&self, other: &ScheduledTask<RFM, SD, SUM>) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<RFM: PartialEq, SD: PartialEq, SUM: PartialEq> PartialEq for ScheduledTask<RFM, SD, SUM>
impl<RFM: PartialEq, SD: PartialEq, SUM: PartialEq> PartialEq for ScheduledTask<RFM, SD, SUM>
Source§fn eq(&self, other: &ScheduledTask<RFM, SD, SUM>) -> bool
fn eq(&self, other: &ScheduledTask<RFM, SD, SUM>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<RFM: PartialOrd, SD: PartialOrd, SUM: PartialOrd> PartialOrd for ScheduledTask<RFM, SD, SUM>
impl<RFM: PartialOrd, SD: PartialOrd, SUM: PartialOrd> PartialOrd for ScheduledTask<RFM, SD, SUM>
impl<RFM: PartialEq, SD: PartialEq, SUM: PartialEq> StructuralPartialEq for ScheduledTask<RFM, SD, SUM>
Source§impl<RFM, SD, SUM> TypeInfo for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> TypeInfo for ScheduledTask<RFM, SD, SUM>
Auto Trait Implementations§
impl<RFM, SD, SUM> Freeze for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> RefUnwindSafe for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> Send for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> Sync for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> Unpin for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> UnsafeUnpin for ScheduledTask<RFM, SD, SUM>
impl<RFM, SD, SUM> UnwindSafe for ScheduledTask<RFM, SD, SUM>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S> Codec for S
Source§impl<T> DecodeAsType for Twhere
T: IntoVisitor,
impl<T> DecodeAsType for Twhere
T: IntoVisitor,
fn decode_as_type_maybe_compact<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
is_compact: bool,
) -> Result<T, Error>where
R: TypeResolver,
Source§fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
fn decode_as_type<R>(
input: &mut &[u8],
type_id: <R as TypeResolver>::TypeId,
types: &R,
) -> Result<Self, Error>where
R: TypeResolver,
Given some input bytes, a
type_id, and type registry, attempt to decode said bytes into
Self. Implementations should modify the &mut reference to the bytes such that any bytes
not used in the course of decoding are still pointed to after decoding is complete.