pub struct InvocationLimits { /* private fields */ }Expand description
Fuel and output limits shared by calls within one invocation.
Record publication is disabled by default. Enable its independent count and logical-byte budgets explicitly:
use rustia::InvocationLimits;
let limits = InvocationLimits::new(50_000)
.with_max_records(32)
.with_max_record_bytes(4 * 1024);Implementations§
Source§impl InvocationLimits
impl InvocationLimits
Sourcepub const fn new(fuel: u64) -> Self
pub const fn new(fuel: u64) -> Self
Creates an invocation budget with fuel execution units and record
publication disabled. If the VM also has a configured builder/settings
fuel limit, the lower value is the effective invocation budget.
Sourcepub const fn with_max_records(self, max_records: u32) -> Self
pub const fn with_max_records(self, max_records: u32) -> Self
Sets the maximum number of records that may be staged.
Sourcepub const fn with_max_record_bytes(self, max_record_bytes: u64) -> Self
pub const fn with_max_record_bytes(self, max_record_bytes: u64) -> Self
Sets the maximum total logical bytes of staged records.
Sourcepub const fn max_records(self) -> u32
pub const fn max_records(self) -> u32
Returns the staged-record count limit.
Sourcepub const fn max_record_bytes(self) -> u64
pub const fn max_record_bytes(self) -> u64
Returns the staged-record logical-byte limit.
Trait Implementations§
Source§impl Clone for InvocationLimits
impl Clone for InvocationLimits
Source§fn clone(&self) -> InvocationLimits
fn clone(&self) -> InvocationLimits
Returns a duplicate 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 InvocationLimits
impl Debug for InvocationLimits
Source§impl PartialEq for InvocationLimits
impl PartialEq for InvocationLimits
impl Copy for InvocationLimits
impl Eq for InvocationLimits
impl StructuralPartialEq for InvocationLimits
Auto Trait Implementations§
impl Freeze for InvocationLimits
impl RefUnwindSafe for InvocationLimits
impl Send for InvocationLimits
impl Sync for InvocationLimits
impl Unpin for InvocationLimits
impl UnsafeUnpin for InvocationLimits
impl UnwindSafe for InvocationLimits
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