pub struct ReplyPacket { /* private fields */ }
Expand description
Reply message packet.
This structure is preparation for future reply message sending. Has no message id.
Implementations§
Source§impl ReplyPacket
impl ReplyPacket
Sourcepub fn new_with_gas(payload: Payload, gas_limit: GasLimit, value: Value) -> Self
pub fn new_with_gas(payload: Payload, gas_limit: GasLimit, value: Value) -> Self
Create new manual ReplyPacket with gas.
Sourcepub fn maybe_with_gas(
payload: Payload,
gas_limit: Option<GasLimit>,
value: Value,
) -> Self
pub fn maybe_with_gas( payload: Payload, gas_limit: Option<GasLimit>, value: Value, ) -> Self
Create new manual ReplyPacket with optional gas.
Sourcepub fn system(payload: Payload, err: impl Into<ErrorReplyReason>) -> Self
pub fn system(payload: Payload, err: impl Into<ErrorReplyReason>) -> Self
Create new system generated ReplyPacket.
Trait Implementations§
Source§impl Clone for ReplyPacket
impl Clone for ReplyPacket
Source§fn clone(&self) -> ReplyPacket
fn clone(&self) -> ReplyPacket
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 ReplyPacket
impl Debug for ReplyPacket
Source§impl Decode for ReplyPacket
impl Decode for ReplyPacket
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 ReplyPacket
impl Default for ReplyPacket
Source§fn default() -> ReplyPacket
fn default() -> ReplyPacket
Returns the “default value” for a type. Read more
Source§impl Encode for ReplyPacket
impl Encode for ReplyPacket
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 ReplyPacket
impl Hash for ReplyPacket
Source§impl Ord for ReplyPacket
impl Ord for ReplyPacket
Source§fn cmp(&self, other: &ReplyPacket) -> Ordering
fn cmp(&self, other: &ReplyPacket) -> 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 ReplyPacket
impl Packet for ReplyPacket
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 ReplyPacket
impl PartialEq for ReplyPacket
Source§impl PartialOrd for ReplyPacket
impl PartialOrd for ReplyPacket
Source§impl TypeInfo for ReplyPacket
impl TypeInfo for ReplyPacket
impl EncodeLike for ReplyPacket
impl Eq for ReplyPacket
impl StructuralPartialEq for ReplyPacket
Auto Trait Implementations§
impl Freeze for ReplyPacket
impl RefUnwindSafe for ReplyPacket
impl Send for ReplyPacket
impl Sync for ReplyPacket
impl Unpin for ReplyPacket
impl UnwindSafe for ReplyPacket
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