pub struct ReplyMessage { /* private fields */ }
Expand description
Message for Reply entry point.
ReplyMessage
is unique because of storing MessageId
from message on what it replies, and can be the only one per some message execution.
Implementations§
Source§impl ReplyMessage
impl ReplyMessage
Sourcepub fn from_packet(id: MessageId, packet: ReplyPacket) -> Self
pub fn from_packet(id: MessageId, packet: ReplyPacket) -> Self
Create ReplyMessage from ReplyPacket.
Sourcepub fn system(
origin_msg_id: MessageId,
payload: Payload,
err: impl Into<ErrorReplyReason>,
) -> Self
pub fn system( origin_msg_id: MessageId, payload: Payload, err: impl Into<ErrorReplyReason>, ) -> Self
Create new system generated ReplyMessage.
Sourcepub fn into_message(
self,
program_id: ProgramId,
destination: ProgramId,
origin_msg_id: MessageId,
) -> Message
pub fn into_message( self, program_id: ProgramId, destination: ProgramId, origin_msg_id: MessageId, ) -> Message
Convert ReplyMessage into Message.
Sourcepub fn into_stored(
self,
program_id: ProgramId,
destination: ProgramId,
origin_msg_id: MessageId,
) -> StoredMessage
pub fn into_stored( self, program_id: ProgramId, destination: ProgramId, origin_msg_id: MessageId, ) -> StoredMessage
Convert ReplyMessage into StoredMessage.
Sourcepub fn into_dispatch(
self,
source: ProgramId,
destination: ProgramId,
origin_msg_id: MessageId,
) -> Dispatch
pub fn into_dispatch( self, source: ProgramId, destination: ProgramId, origin_msg_id: MessageId, ) -> Dispatch
Convert ReplyMessage into Dispatch.
Sourcepub fn into_stored_dispatch(
self,
source: ProgramId,
destination: ProgramId,
origin_msg_id: MessageId,
) -> StoredDispatch
pub fn into_stored_dispatch( self, source: ProgramId, destination: ProgramId, origin_msg_id: MessageId, ) -> StoredDispatch
Convert ReplyMessage into StoredDispatch.
Sourcepub fn payload_bytes(&self) -> &[u8]
pub fn payload_bytes(&self) -> &[u8]
Message payload bytes.
Trait Implementations§
Source§impl Clone for ReplyMessage
impl Clone for ReplyMessage
Source§fn clone(&self) -> ReplyMessage
fn clone(&self) -> ReplyMessage
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 ReplyMessage
impl Debug for ReplyMessage
Source§impl Decode for ReplyMessage
impl Decode for ReplyMessage
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 Default for ReplyMessage
impl Default for ReplyMessage
Source§fn default() -> ReplyMessage
fn default() -> ReplyMessage
Returns the “default value” for a type. Read more
Source§impl Encode for ReplyMessage
impl Encode for ReplyMessage
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 Hash for ReplyMessage
impl Hash for ReplyMessage
Source§impl Ord for ReplyMessage
impl Ord for ReplyMessage
Source§fn cmp(&self, other: &ReplyMessage) -> Ordering
fn cmp(&self, other: &ReplyMessage) -> 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 ReplyMessage
impl PartialEq for ReplyMessage
Source§impl PartialOrd for ReplyMessage
impl PartialOrd for ReplyMessage
Source§impl TypeInfo for ReplyMessage
impl TypeInfo for ReplyMessage
impl EncodeLike for ReplyMessage
impl Eq for ReplyMessage
impl StructuralPartialEq for ReplyMessage
Auto Trait Implementations§
impl Freeze for ReplyMessage
impl RefUnwindSafe for ReplyMessage
impl Send for ReplyMessage
impl Sync for ReplyMessage
impl Unpin for ReplyMessage
impl UnwindSafe for ReplyMessage
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