pub struct InitPacket { /* private fields */ }
Expand description
Init message packet.
This structure is preparation for future init message sending. Has no message id.
Implementations§
Source§impl InitPacket
impl InitPacket
Sourcepub fn new_from_user(
code_id: CodeId,
salt: Salt,
payload: Payload,
gas_limit: GasLimit,
value: Value,
) -> Self
pub fn new_from_user( code_id: CodeId, salt: Salt, payload: Payload, gas_limit: GasLimit, value: Value, ) -> Self
Create new InitPacket via user.
Sourcepub fn new_from_program(
code_id: CodeId,
salt: Salt,
payload: Payload,
message_id: MessageId,
gas_limit: Option<GasLimit>,
value: Value,
) -> Self
pub fn new_from_program( code_id: CodeId, salt: Salt, payload: Payload, message_id: MessageId, gas_limit: Option<GasLimit>, value: Value, ) -> Self
Create new InitPacket via program.
Sourcepub fn destination(&self) -> ProgramId
pub fn destination(&self) -> ProgramId
Packet destination (newly created program id).
Trait Implementations§
Source§impl Clone for InitPacket
impl Clone for InitPacket
Source§fn clone(&self) -> InitPacket
fn clone(&self) -> InitPacket
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 InitPacket
impl Debug for InitPacket
Source§impl Decode for InitPacket
impl Decode for InitPacket
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 InitPacket
impl Default for InitPacket
Source§fn default() -> InitPacket
fn default() -> InitPacket
Returns the “default value” for a type. Read more
Source§impl Encode for InitPacket
impl Encode for InitPacket
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 InitPacket
impl Hash for InitPacket
Source§impl Ord for InitPacket
impl Ord for InitPacket
Source§fn cmp(&self, other: &InitPacket) -> Ordering
fn cmp(&self, other: &InitPacket) -> 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 Packet for InitPacket
impl Packet for InitPacket
Source§fn payload_bytes(&self) -> &[u8]
fn payload_bytes(&self) -> &[u8]
Packet payload bytes.
Source§fn payload_len(&self) -> u32
fn payload_len(&self) -> u32
Payload len
Source§fn kind() -> DispatchKind
fn kind() -> DispatchKind
A dispatch kind the will be generated from the packet.
Source§impl PartialEq for InitPacket
impl PartialEq for InitPacket
Source§impl PartialOrd for InitPacket
impl PartialOrd for InitPacket
Source§impl TypeInfo for InitPacket
impl TypeInfo for InitPacket
impl EncodeLike for InitPacket
impl Eq for InitPacket
impl StructuralPartialEq for InitPacket
Auto Trait Implementations§
impl Freeze for InitPacket
impl RefUnwindSafe for InitPacket
impl Send for InitPacket
impl Sync for InitPacket
impl Unpin for InitPacket
impl UnwindSafe for InitPacket
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