pub enum BudgetConstraint {
Time {
max_seconds: f64,
},
Memory {
max_bytes: usize,
},
Operations {
max_operations: usize,
},
Combined {
max_seconds: Option<f64>,
max_bytes: Option<usize>,
max_operations: Option<usize>,
},
}Expand description
Budget constraint types BudgetConstraint
Variants§
Time
Time budget in seconds
Memory
Memory budget in bytes
Operations
Operations budget (approximate number of operations)
Combined
Combined budget with multiple constraints
Trait Implementations§
Source§impl Clone for BudgetConstraint
impl Clone for BudgetConstraint
Source§fn clone(&self) -> BudgetConstraint
fn clone(&self) -> BudgetConstraint
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 moreAuto Trait Implementations§
impl Freeze for BudgetConstraint
impl RefUnwindSafe for BudgetConstraint
impl Send for BudgetConstraint
impl Sync for BudgetConstraint
impl Unpin for BudgetConstraint
impl UnwindSafe for BudgetConstraint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more