pub struct IncomingMessage { /* private fields */ }
Expand description
Incoming message.
Used for program execution.
Implementations§
Source§impl IncomingMessage
impl IncomingMessage
Sourcepub fn new(
id: MessageId,
source: ProgramId,
payload: Payload,
gas_limit: GasLimit,
value: Value,
details: Option<MessageDetails>,
) -> Self
pub fn new( id: MessageId, source: ProgramId, payload: Payload, gas_limit: GasLimit, value: Value, details: Option<MessageDetails>, ) -> Self
Create new IncomingMessage.
Sourcepub fn into_stored(self, destination: ProgramId) -> StoredMessage
pub fn into_stored(self, destination: ProgramId) -> StoredMessage
Convert IncomingMessage into gasless StoredMessage.
Sourcepub fn payload_bytes(&self) -> &[u8]
pub fn payload_bytes(&self) -> &[u8]
Message payload bytes.
Sourcepub fn payload_mut(&mut self) -> &mut Payload
pub fn payload_mut(&mut self) -> &mut Payload
Mutable reference to message payload.
Sourcepub fn details(&self) -> Option<MessageDetails>
pub fn details(&self) -> Option<MessageDetails>
Message details.
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 Clone for IncomingMessage
impl Clone for IncomingMessage
Source§fn clone(&self) -> IncomingMessage
fn clone(&self) -> IncomingMessage
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 IncomingMessage
impl Debug for IncomingMessage
Source§impl Decode for IncomingMessage
impl Decode for IncomingMessage
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 IncomingMessage
impl Default for IncomingMessage
Source§fn default() -> IncomingMessage
fn default() -> IncomingMessage
Returns the “default value” for a type. Read more
Source§impl Encode for IncomingMessage
impl Encode for IncomingMessage
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 IncomingMessage
impl Hash for IncomingMessage
Source§impl Ord for IncomingMessage
impl Ord for IncomingMessage
Source§fn cmp(&self, other: &IncomingMessage) -> Ordering
fn cmp(&self, other: &IncomingMessage) -> 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 IncomingMessage
impl PartialEq for IncomingMessage
Source§impl PartialOrd for IncomingMessage
impl PartialOrd for IncomingMessage
Source§impl TypeInfo for IncomingMessage
impl TypeInfo for IncomingMessage
impl EncodeLike for IncomingMessage
impl Eq for IncomingMessage
impl StructuralPartialEq for IncomingMessage
Auto Trait Implementations§
impl Freeze for IncomingMessage
impl RefUnwindSafe for IncomingMessage
impl Send for IncomingMessage
impl Sync for IncomingMessage
impl Unpin for IncomingMessage
impl UnwindSafe for IncomingMessage
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