pub struct StoredMessage { /* private fields */ }
Expand description
Stored message.
Gasless Message for storing.
Implementations§
Source§impl StoredMessage
impl StoredMessage
Sourcepub fn new(
id: MessageId,
source: ProgramId,
destination: ProgramId,
payload: Payload,
value: Value,
details: Option<MessageDetails>,
) -> Self
pub fn new( id: MessageId, source: ProgramId, destination: ProgramId, payload: Payload, value: Value, details: Option<MessageDetails>, ) -> Self
Create new StoredMessage.
Sourcepub fn into_parts(
self,
) -> (MessageId, ProgramId, ProgramId, Payload, Value, Option<MessageDetails>)
pub fn into_parts( self, ) -> (MessageId, ProgramId, ProgramId, Payload, Value, Option<MessageDetails>)
Into parts.
Sourcepub fn into_incoming(self, gas_limit: GasLimit) -> IncomingMessage
pub fn into_incoming(self, gas_limit: GasLimit) -> IncomingMessage
Convert StoredMessage into IncomingMessage for program processing.
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 StoredMessage
impl Clone for StoredMessage
Source§fn clone(&self) -> StoredMessage
fn clone(&self) -> StoredMessage
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 StoredMessage
impl Debug for StoredMessage
Source§impl Decode for StoredMessage
impl Decode for StoredMessage
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 StoredMessage
impl Default for StoredMessage
Source§fn default() -> StoredMessage
fn default() -> StoredMessage
Returns the “default value” for a type. Read more
Source§impl Encode for StoredMessage
impl Encode for StoredMessage
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<Message> for StoredMessage
impl From<Message> for StoredMessage
Source§fn from(message: Message) -> StoredMessage
fn from(message: Message) -> StoredMessage
Converts to this type from the input type.
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 From<UserStoredMessage> for StoredMessage
impl From<UserStoredMessage> for StoredMessage
Source§fn from(user_stored: UserStoredMessage) -> Self
fn from(user_stored: UserStoredMessage) -> Self
Converts to this type from the input type.
Source§impl Hash for StoredMessage
impl Hash for StoredMessage
Source§impl Ord for StoredMessage
impl Ord for StoredMessage
Source§fn cmp(&self, other: &StoredMessage) -> Ordering
fn cmp(&self, other: &StoredMessage) -> 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 StoredMessage
impl PartialEq for StoredMessage
Source§impl PartialOrd for StoredMessage
impl PartialOrd for StoredMessage
Source§impl TryFrom<StoredMessage> for UserMessage
impl TryFrom<StoredMessage> for UserMessage
Source§impl TryFrom<StoredMessage> for UserStoredMessage
impl TryFrom<StoredMessage> for UserStoredMessage
Source§impl TypeInfo for StoredMessage
impl TypeInfo for StoredMessage
impl EncodeLike for StoredMessage
impl Eq for StoredMessage
impl StructuralPartialEq for StoredMessage
Auto Trait Implementations§
impl Freeze for StoredMessage
impl RefUnwindSafe for StoredMessage
impl Send for StoredMessage
impl Sync for StoredMessage
impl Unpin for StoredMessage
impl UnwindSafe for StoredMessage
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