Struct gear_core::message::ContextStore  
source · pub struct ContextStore { /* private fields */ }Expand description
Store of previous message execution context.
Implementations§
source§impl ContextStore
 
impl ContextStore
sourcepub fn new(
    outgoing: BTreeMap<u32, Option<Payload>>,
    reply: Option<Payload>,
    initialized: BTreeSet<ProgramId>,
    reservation_nonce: ReservationNonce,
    system_reservation: Option<u64>
) -> Self
 
pub fn new( outgoing: BTreeMap<u32, Option<Payload>>, reply: Option<Payload>, initialized: BTreeSet<ProgramId>, reservation_nonce: ReservationNonce, system_reservation: Option<u64> ) -> Self
Create a new context store with the provided parameters.
sourcepub fn set_reservation_nonce(&mut self, gas_reserver: &GasReserver)
 
pub fn set_reservation_nonce(&mut self, gas_reserver: &GasReserver)
Set reservation nonce from gas reserver.
Gas reserver has actual nonce state during/after execution.
sourcepub fn add_system_reservation(&mut self, amount: u64)
 
pub fn add_system_reservation(&mut self, amount: u64)
Set system reservation.
sourcepub fn system_reservation(&self) -> Option<u64>
 
pub fn system_reservation(&self) -> Option<u64>
Get system reservation.
Trait Implementations§
source§impl Clone for ContextStore
 
impl Clone for ContextStore
source§fn clone(&self) -> ContextStore
 
fn clone(&self) -> ContextStore
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 ContextStore
 
impl Debug for ContextStore
source§impl Decode for ContextStore
 
impl Decode for ContextStore
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 ContextStore
 
impl Default for ContextStore
source§fn default() -> ContextStore
 
fn default() -> ContextStore
Returns the “default value” for a type. Read more
source§impl Encode for ContextStore
 
impl Encode for ContextStore
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 ContextStore
 
impl Hash for ContextStore
source§impl Ord for ContextStore
 
impl Ord for ContextStore
source§fn cmp(&self, other: &ContextStore) -> Ordering
 
fn cmp(&self, other: &ContextStore) -> 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 ContextStore
 
impl PartialEq for ContextStore
source§fn eq(&self, other: &ContextStore) -> bool
 
fn eq(&self, other: &ContextStore) -> bool
This method tests for 
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ContextStore
 
impl PartialOrd for ContextStore
source§fn partial_cmp(&self, other: &ContextStore) -> Option<Ordering>
 
fn partial_cmp(&self, other: &ContextStore) -> 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 ContextStore
 
impl TypeInfo for ContextStore
impl EncodeLike for ContextStore
impl Eq for ContextStore
impl StructuralPartialEq for ContextStore
Auto Trait Implementations§
impl Freeze for ContextStore
impl RefUnwindSafe for ContextStore
impl Send for ContextStore
impl Sync for ContextStore
impl Unpin for ContextStore
impl UnwindSafe for ContextStore
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