pub struct InitMessage { /* private fields */ }
Expand description
Message for Init entry point. Used to initiate a newly created program.
Implementations§
Source§impl InitMessage
impl InitMessage
Sourcepub fn from_packet(id: MessageId, packet: InitPacket) -> Self
pub fn from_packet(id: MessageId, packet: InitPacket) -> Self
Create InitMessage from InitPacket.
Sourcepub fn into_message(self, source: ProgramId) -> Message
pub fn into_message(self, source: ProgramId) -> Message
Convert InitMessage into Message.
Sourcepub fn into_stored(self, source: ProgramId) -> StoredMessage
pub fn into_stored(self, source: ProgramId) -> StoredMessage
Convert InitMessage into StoredMessage.
Sourcepub fn into_dispatch(self, source: ProgramId) -> Dispatch
pub fn into_dispatch(self, source: ProgramId) -> Dispatch
Convert InitMessage into Dispatch.
Sourcepub fn into_stored_dispatch(self, source: ProgramId) -> StoredDispatch
pub fn into_stored_dispatch(self, source: ProgramId) -> StoredDispatch
Convert InitMessage into StoredDispatch.
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.
Trait Implementations§
Source§impl Clone for InitMessage
impl Clone for InitMessage
Source§fn clone(&self) -> InitMessage
fn clone(&self) -> InitMessage
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 InitMessage
impl Debug for InitMessage
Source§impl Decode for InitMessage
impl Decode for InitMessage
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 InitMessage
impl Default for InitMessage
Source§fn default() -> InitMessage
fn default() -> InitMessage
Returns the “default value” for a type. Read more
Source§impl Encode for InitMessage
impl Encode for InitMessage
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 InitMessage
impl Hash for InitMessage
Source§impl Ord for InitMessage
impl Ord for InitMessage
Source§fn cmp(&self, other: &InitMessage) -> Ordering
fn cmp(&self, other: &InitMessage) -> 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 InitMessage
impl PartialEq for InitMessage
Source§impl PartialOrd for InitMessage
impl PartialOrd for InitMessage
Source§impl TypeInfo for InitMessage
impl TypeInfo for InitMessage
impl EncodeLike for InitMessage
impl Eq for InitMessage
impl StructuralPartialEq for InitMessage
Auto Trait Implementations§
impl Freeze for InitMessage
impl RefUnwindSafe for InitMessage
impl Send for InitMessage
impl Sync for InitMessage
impl Unpin for InitMessage
impl UnwindSafe for InitMessage
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