pub struct StoredDispatch { /* private fields */ }
Expand description
Stored message with entry point and previous execution context, if exists.
Implementations§
Source§impl StoredDispatch
impl StoredDispatch
Sourcepub fn new(
kind: DispatchKind,
message: StoredMessage,
context: Option<ContextStore>,
) -> Self
pub fn new( kind: DispatchKind, message: StoredMessage, context: Option<ContextStore>, ) -> Self
Create new StoredDispatch.
Sourcepub fn into_incoming(self, gas_limit: GasLimit) -> IncomingDispatch
pub fn into_incoming(self, gas_limit: GasLimit) -> IncomingDispatch
Convert StoredDispatch into IncomingDispatch for program processing.
Sourcepub fn into_parts(self) -> (DispatchKind, StoredMessage, Option<ContextStore>)
pub fn into_parts(self) -> (DispatchKind, StoredMessage, Option<ContextStore>)
Decompose StoredDispatch for it’s components: DispatchKind, StoredMessage and Option<ContextStore>
.
Sourcepub fn kind(&self) -> DispatchKind
pub fn kind(&self) -> DispatchKind
Entry point for the message.
Sourcepub fn message(&self) -> &StoredMessage
pub fn message(&self) -> &StoredMessage
Dispatch message reference.
Sourcepub fn context(&self) -> &Option<ContextStore>
pub fn context(&self) -> &Option<ContextStore>
Previous execution context reference, if exists.
Methods from Deref<Target = StoredMessage>§
Sourcepub fn destination(&self) -> ProgramId
pub fn destination(&self) -> ProgramId
Message destination.
Sourcepub fn payload_bytes(&self) -> &[u8]
pub fn payload_bytes(&self) -> &[u8]
Message payload bytes.
Sourcepub fn details(&self) -> Option<MessageDetails>
pub fn details(&self) -> Option<MessageDetails>
Message details.
Sourcepub fn reply_details(&self) -> Option<ReplyDetails>
pub fn reply_details(&self) -> Option<ReplyDetails>
Message reply.
Sourcepub fn is_error_reply(&self) -> bool
pub fn is_error_reply(&self) -> bool
Returns bool defining if message is error reply.
Sourcepub fn reply_code(&self) -> Option<ReplyCode>
pub fn reply_code(&self) -> Option<ReplyCode>
Returns ReplyCode
of message if reply.
Trait Implementations§
Source§impl Clone for StoredDispatch
impl Clone for StoredDispatch
Source§fn clone(&self) -> StoredDispatch
fn clone(&self) -> StoredDispatch
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StoredDispatch
impl Debug for StoredDispatch
Source§impl Decode for StoredDispatch
impl Decode for StoredDispatch
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 Deref for StoredDispatch
impl Deref for StoredDispatch
Source§impl Encode for StoredDispatch
impl Encode for StoredDispatch
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 From<Dispatch> for StoredDispatch
impl From<Dispatch> for StoredDispatch
Source§fn from(dispatch: Dispatch) -> StoredDispatch
fn from(dispatch: Dispatch) -> StoredDispatch
Converts to this type from the input type.
Source§impl From<StoredDelayedDispatch> for StoredDispatch
impl From<StoredDelayedDispatch> for StoredDispatch
Source§fn from(dispatch: StoredDelayedDispatch) -> Self
fn from(dispatch: StoredDelayedDispatch) -> Self
Converts to this type from the input type.
Source§impl From<StoredDispatch> for (DispatchKind, StoredMessage, Option<ContextStore>)
impl From<StoredDispatch> for (DispatchKind, StoredMessage, Option<ContextStore>)
Source§fn from(
dispatch: StoredDispatch,
) -> (DispatchKind, StoredMessage, Option<ContextStore>)
fn from( dispatch: StoredDispatch, ) -> (DispatchKind, StoredMessage, Option<ContextStore>)
Converts to this type from the input type.
Source§impl Hash for StoredDispatch
impl Hash for StoredDispatch
Source§impl Ord for StoredDispatch
impl Ord for StoredDispatch
Source§fn cmp(&self, other: &StoredDispatch) -> Ordering
fn cmp(&self, other: &StoredDispatch) -> Ordering
1.21.0 · 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 PartialEq for StoredDispatch
impl PartialEq for StoredDispatch
Source§impl PartialOrd for StoredDispatch
impl PartialOrd for StoredDispatch
Source§impl TypeInfo for StoredDispatch
impl TypeInfo for StoredDispatch
impl EncodeLike for StoredDispatch
impl Eq for StoredDispatch
impl StructuralPartialEq for StoredDispatch
Auto Trait Implementations§
impl Freeze for StoredDispatch
impl RefUnwindSafe for StoredDispatch
impl Send for StoredDispatch
impl Sync for StoredDispatch
impl Unpin for StoredDispatch
impl UnwindSafe for StoredDispatch
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