pub struct Dispatch { /* private fields */ }
Expand description
Message with entry point.
Implementations§
Source§impl Dispatch
impl Dispatch
Sourcepub fn new(kind: DispatchKind, message: Message) -> Self
pub fn new(kind: DispatchKind, message: Message) -> Self
Create new Dispatch.
Sourcepub fn into_stored(self) -> StoredDispatch
pub fn into_stored(self) -> StoredDispatch
Convert Dispatch into gasless StoredDispatch with empty previous context.
Sourcepub fn into_stored_delayed(self) -> StoredDelayedDispatch
pub fn into_stored_delayed(self) -> StoredDelayedDispatch
Convert Dispatch into gasless StoredDelayedDispatch.
Sourcepub fn into_parts(self) -> (DispatchKind, Message)
pub fn into_parts(self) -> (DispatchKind, Message)
Decompose Dispatch for it’s components: DispatchKind and Message.
Sourcepub fn kind(&self) -> DispatchKind
pub fn kind(&self) -> DispatchKind
Entry point for the message.
Methods from Deref<Target = Message>§
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 reply_details(&self) -> Option<ReplyDetails>
pub fn reply_details(&self) -> Option<ReplyDetails>
Message reply.
Sourcepub fn signal_details(&self) -> Option<SignalDetails>
pub fn signal_details(&self) -> Option<SignalDetails>
Message signal.
Sourcepub fn is_error_reply(&self) -> bool
pub fn is_error_reply(&self) -> bool
Returns bool defining if message is error reply.
Trait Implementations§
Source§impl Decode for Dispatch
impl Decode for Dispatch
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 Encode for Dispatch
impl Encode for Dispatch
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<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 Ord for Dispatch
impl Ord for Dispatch
Source§impl PartialOrd for Dispatch
impl PartialOrd for Dispatch
impl EncodeLike for Dispatch
impl Eq for Dispatch
impl StructuralPartialEq for Dispatch
Auto Trait Implementations§
impl Freeze for Dispatch
impl RefUnwindSafe for Dispatch
impl Send for Dispatch
impl Sync for Dispatch
impl Unpin for Dispatch
impl UnwindSafe for Dispatch
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