pub struct ContextStore { /* private fields */ }
Expand description
Store of previous message execution context.
Implementations§
Source§impl ContextStore
impl ContextStore
Sourcepub fn new(
initialized: BTreeSet<ProgramId>,
reservation_nonce: ReservationNonce,
system_reservation: Option<u64>,
local_nonce: u32,
) -> Self
pub fn new( initialized: BTreeSet<ProgramId>, reservation_nonce: ReservationNonce, system_reservation: Option<u64>, local_nonce: u32, ) -> 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§impl PartialOrd for ContextStore
impl PartialOrd for ContextStore
Source§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