pub struct GasInfo {
pub min_limit: u64,
pub reserved: u64,
pub burned: u64,
pub may_be_returned: u64,
pub waited: bool,
}
Expand description
The struct contains results of gas calculation required to process a message.
Fields§
§min_limit: u64
Represents minimum gas limit required for execution.
reserved: u64
Gas amount that we reserve for some other on-chain interactions.
burned: u64
Contains number of gas burned during message processing.
may_be_returned: u64
The value may be returned if a program happens to be executed the second or next time in a block.
waited: bool
Was the message placed into waitlist at the end of calculating.
This flag shows, that min_limit
makes sense and have some guarantees
only before insertion into waitlist.
Trait Implementations§
Source§impl Decode for GasInfo
impl Decode for GasInfo
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 GasInfo
impl Encode for GasInfo
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
impl EncodeLike for GasInfo
impl Eq for GasInfo
impl StructuralPartialEq for GasInfo
Auto Trait Implementations§
impl Freeze for GasInfo
impl RefUnwindSafe for GasInfo
impl Send for GasInfo
impl Sync for GasInfo
impl Unpin for GasInfo
impl UnwindSafe for GasInfo
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