pub trait SuiGasStatusAPI {
Show 22 methods
// Required methods
fn is_unmetered(&self) -> bool;
fn move_gas_status(&self) -> &GasStatus;
fn move_gas_status_mut(&mut self) -> &mut GasStatus;
fn bucketize_computation(
&mut self,
aborted: Option<bool>,
) -> Result<(), ExecutionError>;
fn summary(&self) -> GasCostSummary;
fn gas_budget(&self) -> u64;
fn gas_price(&self) -> u64;
fn reference_gas_price(&self) -> u64;
fn storage_gas_units(&self) -> u64;
fn storage_rebate(&self) -> u64;
fn unmetered_storage_rebate(&self) -> u64;
fn gas_used(&self) -> u64;
fn reset_storage_cost_and_rebate(&mut self);
fn charge_storage_read(&mut self, size: usize) -> Result<(), ExecutionError>;
fn charge_publish_package(
&mut self,
size: usize,
) -> Result<(), ExecutionError>;
fn track_storage_mutation(
&mut self,
object_id: ObjectID,
new_size: usize,
storage_rebate: u64,
) -> Option<u64>;
fn charge_storage_and_rebate(&mut self) -> Result<(), ExecutionError>;
fn adjust_computation_on_out_of_gas(&mut self);
fn gas_usage_report(&self) -> GasUsageReport;
fn check_gas_balance(
&self,
gas_objs: &[&ObjectReadResult],
gas_budget: u64,
available_address_balance_gas: u64,
) -> UserInputResult;
fn check_gas_objects(
&self,
gas_objs: &[&ObjectReadResult],
) -> UserInputResult;
fn per_object_storage(&self) -> &Vec<(ObjectID, PerObjectStorage)>;
}Required Methods§
fn is_unmetered(&self) -> bool
fn move_gas_status(&self) -> &GasStatus
fn move_gas_status_mut(&mut self) -> &mut GasStatus
fn bucketize_computation( &mut self, aborted: Option<bool>, ) -> Result<(), ExecutionError>
fn summary(&self) -> GasCostSummary
fn gas_budget(&self) -> u64
fn gas_price(&self) -> u64
fn reference_gas_price(&self) -> u64
fn storage_gas_units(&self) -> u64
fn storage_rebate(&self) -> u64
fn unmetered_storage_rebate(&self) -> u64
fn gas_used(&self) -> u64
fn reset_storage_cost_and_rebate(&mut self)
fn charge_storage_read(&mut self, size: usize) -> Result<(), ExecutionError>
fn charge_publish_package(&mut self, size: usize) -> Result<(), ExecutionError>
fn track_storage_mutation( &mut self, object_id: ObjectID, new_size: usize, storage_rebate: u64, ) -> Option<u64>
fn charge_storage_and_rebate(&mut self) -> Result<(), ExecutionError>
fn adjust_computation_on_out_of_gas(&mut self)
fn gas_usage_report(&self) -> GasUsageReport
fn check_gas_balance( &self, gas_objs: &[&ObjectReadResult], gas_budget: u64, available_address_balance_gas: u64, ) -> UserInputResult
fn check_gas_objects(&self, gas_objs: &[&ObjectReadResult]) -> UserInputResult
fn per_object_storage(&self) -> &Vec<(ObjectID, PerObjectStorage)>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".