pub struct StoredDelayedDispatch { /* private fields */ }
Expand description
Stored message with entry point.
We could use just StoredDispatch
but delayed messages always don’t have ContextStore
so we designate this fact via new type.
Implementations§
Source§impl StoredDelayedDispatch
impl StoredDelayedDispatch
Sourcepub fn new(kind: DispatchKind, message: StoredMessage) -> Self
pub fn new(kind: DispatchKind, message: StoredMessage) -> Self
Create new StoredDelayedDispatch.
Sourcepub fn into_parts(self) -> (DispatchKind, StoredMessage)
pub fn into_parts(self) -> (DispatchKind, StoredMessage)
Decompose StoredDelayedDispatch for it’s components: DispatchKind, StoredMessage.
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.
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 StoredDelayedDispatch
impl Clone for StoredDelayedDispatch
Source§fn clone(&self) -> StoredDelayedDispatch
fn clone(&self) -> StoredDelayedDispatch
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 StoredDelayedDispatch
impl Debug for StoredDelayedDispatch
Source§impl Decode for StoredDelayedDispatch
impl Decode for StoredDelayedDispatch
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 StoredDelayedDispatch
impl Deref for StoredDelayedDispatch
Source§impl Encode for StoredDelayedDispatch
impl Encode for StoredDelayedDispatch
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 StoredDelayedDispatch
impl From<Dispatch> for StoredDelayedDispatch
Source§fn from(dispatch: Dispatch) -> StoredDelayedDispatch
fn from(dispatch: Dispatch) -> StoredDelayedDispatch
Converts to this type from the input type.
Source§impl From<StoredDelayedDispatch> for (DispatchKind, StoredMessage)
impl From<StoredDelayedDispatch> for (DispatchKind, StoredMessage)
Source§fn from(dispatch: StoredDelayedDispatch) -> (DispatchKind, StoredMessage)
fn from(dispatch: StoredDelayedDispatch) -> (DispatchKind, StoredMessage)
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 Hash for StoredDelayedDispatch
impl Hash for StoredDelayedDispatch
Source§impl Ord for StoredDelayedDispatch
impl Ord for StoredDelayedDispatch
Source§fn cmp(&self, other: &StoredDelayedDispatch) -> Ordering
fn cmp(&self, other: &StoredDelayedDispatch) -> 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 StoredDelayedDispatch
impl PartialEq for StoredDelayedDispatch
Source§impl PartialOrd for StoredDelayedDispatch
impl PartialOrd for StoredDelayedDispatch
Source§impl TypeInfo for StoredDelayedDispatch
impl TypeInfo for StoredDelayedDispatch
impl EncodeLike for StoredDelayedDispatch
impl Eq for StoredDelayedDispatch
impl StructuralPartialEq for StoredDelayedDispatch
Auto Trait Implementations§
impl Freeze for StoredDelayedDispatch
impl RefUnwindSafe for StoredDelayedDispatch
impl Send for StoredDelayedDispatch
impl Sync for StoredDelayedDispatch
impl Unpin for StoredDelayedDispatch
impl UnwindSafe for StoredDelayedDispatch
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