Struct gear_core::message::ReplyPacket  
source · 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§impl PartialEq for ReplyPacket
 
impl PartialEq for ReplyPacket
source§fn eq(&self, other: &ReplyPacket) -> bool
 
fn eq(&self, other: &ReplyPacket) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ReplyPacket
 
impl PartialOrd for ReplyPacket
source§fn partial_cmp(&self, other: &ReplyPacket) -> Option<Ordering>
 
fn partial_cmp(&self, other: &ReplyPacket) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moresource§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