Struct gear_core::message::ContextSettings
source · pub struct ContextSettings { /* private fields */ }Expand description
Context settings.
Implementations§
source§impl ContextSettings
impl ContextSettings
sourcepub fn new(
sending_fee: u64,
scheduled_sending_fee: u64,
waiting_fee: u64,
waking_fee: u64,
reservation_fee: u64,
outgoing_limit: u32
) -> Self
pub fn new( sending_fee: u64, scheduled_sending_fee: u64, waiting_fee: u64, waking_fee: u64, reservation_fee: u64, outgoing_limit: u32 ) -> Self
Create new ContextSettings.
sourcepub fn sending_fee(&self) -> u64
pub fn sending_fee(&self) -> u64
Getter for inner sending fee field.
sourcepub fn scheduled_sending_fee(&self) -> u64
pub fn scheduled_sending_fee(&self) -> u64
Getter for inner scheduled sending fee field.
sourcepub fn waiting_fee(&self) -> u64
pub fn waiting_fee(&self) -> u64
Getter for inner waiting fee field.
sourcepub fn waking_fee(&self) -> u64
pub fn waking_fee(&self) -> u64
Getter for inner waking fee field.
sourcepub fn reservation_fee(&self) -> u64
pub fn reservation_fee(&self) -> u64
Getter for inner reservation fee field.
sourcepub fn outgoing_limit(&self) -> u32
pub fn outgoing_limit(&self) -> u32
Getter for inner outgoing limit field.
Trait Implementations§
source§impl Clone for ContextSettings
impl Clone for ContextSettings
source§fn clone(&self) -> ContextSettings
fn clone(&self) -> ContextSettings
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 ContextSettings
impl Debug for ContextSettings
source§impl Decode for ContextSettings
impl Decode for ContextSettings
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 Encode for ContextSettings
impl Encode for ContextSettings
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 size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
source§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> 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 ContextSettings
impl Hash for ContextSettings
source§impl Ord for ContextSettings
impl Ord for ContextSettings
source§fn cmp(&self, other: &ContextSettings) -> Ordering
fn cmp(&self, other: &ContextSettings) -> 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<ContextSettings> for ContextSettings
impl PartialEq<ContextSettings> for ContextSettings
source§fn eq(&self, other: &ContextSettings) -> bool
fn eq(&self, other: &ContextSettings) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ContextSettings> for ContextSettings
impl PartialOrd<ContextSettings> for ContextSettings
source§fn partial_cmp(&self, other: &ContextSettings) -> Option<Ordering>
fn partial_cmp(&self, other: &ContextSettings) -> 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 ContextSettings
impl TypeInfo for ContextSettings
impl Copy for ContextSettings
impl EncodeLike<ContextSettings> for ContextSettings
impl Eq for ContextSettings
impl StructuralEq for ContextSettings
impl StructuralPartialEq for ContextSettings
Auto Trait Implementations§
impl RefUnwindSafe for ContextSettings
impl Send for ContextSettings
impl Sync for ContextSettings
impl Unpin for ContextSettings
impl UnwindSafe for ContextSettings
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