pub struct AlgorithmControl {
pub max_work: Option<u64>,
pub max_memory_cells: Option<usize>,
pub max_time: Option<Duration>,
pub costs: AlgorithmWorkCosts,
}Expand description
Bounds and accounting policy for a graph algorithm run.
Fields§
§max_work: Option<u64>Optional maximum charged work.
max_memory_cells: Option<usize>Optional maximum simultaneously retained table cells.
max_time: Option<Duration>Optional wall-clock deadline relative to the start of the call.
costs: AlgorithmWorkCostsPer-operation work costs.
Implementations§
Source§impl AlgorithmControl
impl AlgorithmControl
Sourcepub fn with_max_work(self, max_work: u64) -> Self
pub fn with_max_work(self, max_work: u64) -> Self
Returns a copy with a maximum work bound.
Sourcepub fn with_max_memory_cells(self, max_memory_cells: usize) -> Self
pub fn with_max_memory_cells(self, max_memory_cells: usize) -> Self
Returns a copy with a maximum retained-cell bound.
Sourcepub fn with_max_time(self, max_time: Duration) -> Self
pub fn with_max_time(self, max_time: Duration) -> Self
Returns a copy with a relative wall-clock deadline.
Sourcepub fn with_costs(self, costs: AlgorithmWorkCosts) -> Self
pub fn with_costs(self, costs: AlgorithmWorkCosts) -> Self
Returns a copy with explicit cell and edge charges.
Trait Implementations§
Source§impl Clone for AlgorithmControl
impl Clone for AlgorithmControl
Source§fn clone(&self) -> AlgorithmControl
fn clone(&self) -> AlgorithmControl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AlgorithmControl
impl Debug for AlgorithmControl
Source§impl Default for AlgorithmControl
impl Default for AlgorithmControl
Source§fn default() -> AlgorithmControl
fn default() -> AlgorithmControl
Returns the “default value” for a type. Read more
impl Eq for AlgorithmControl
Source§impl PartialEq for AlgorithmControl
impl PartialEq for AlgorithmControl
impl StructuralPartialEq for AlgorithmControl
Auto Trait Implementations§
impl Freeze for AlgorithmControl
impl RefUnwindSafe for AlgorithmControl
impl Send for AlgorithmControl
impl Sync for AlgorithmControl
impl Unpin for AlgorithmControl
impl UnsafeUnpin for AlgorithmControl
impl UnwindSafe for AlgorithmControl
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