pub struct UserMessage { /* private fields */ }
Expand description
Message sent to user and deposited as event.
Implementations§
Source§impl UserMessage
impl UserMessage
Sourcepub fn new(
id: MessageId,
source: ProgramId,
destination: ProgramId,
payload: Payload,
value: Value,
details: Option<ReplyDetails>,
) -> Self
pub fn new( id: MessageId, source: ProgramId, destination: ProgramId, payload: Payload, value: Value, details: Option<ReplyDetails>, ) -> Self
Create new UserMessage.
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<ReplyDetails>
pub fn details(&self) -> Option<ReplyDetails>
Message reply details.
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 UserMessage
impl Clone for UserMessage
Source§fn clone(&self) -> UserMessage
fn clone(&self) -> UserMessage
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 UserMessage
impl Debug for UserMessage
Source§impl Decode for UserMessage
impl Decode for UserMessage
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 UserMessage
impl Default for UserMessage
Source§fn default() -> UserMessage
fn default() -> UserMessage
Returns the “default value” for a type. Read more
Source§impl Encode for UserMessage
impl Encode for UserMessage
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<UserMessage> for StoredMessage
impl From<UserMessage> for StoredMessage
Source§fn from(user: UserMessage) -> Self
fn from(user: UserMessage) -> Self
Converts to this type from the input type.
Source§impl Hash for UserMessage
impl Hash for UserMessage
Source§impl Ord for UserMessage
impl Ord for UserMessage
Source§fn cmp(&self, other: &UserMessage) -> Ordering
fn cmp(&self, other: &UserMessage) -> 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 UserMessage
impl PartialEq for UserMessage
Source§impl PartialOrd for UserMessage
impl PartialOrd for UserMessage
Source§impl TryFrom<StoredMessage> for UserMessage
impl TryFrom<StoredMessage> for UserMessage
Source§impl TryFrom<UserMessage> for UserStoredMessage
impl TryFrom<UserMessage> for UserStoredMessage
Source§impl TypeInfo for UserMessage
impl TypeInfo for UserMessage
impl EncodeLike for UserMessage
impl Eq for UserMessage
impl StructuralPartialEq for UserMessage
Auto Trait Implementations§
impl Freeze for UserMessage
impl RefUnwindSafe for UserMessage
impl Send for UserMessage
impl Sync for UserMessage
impl Unpin for UserMessage
impl UnwindSafe for UserMessage
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