pub struct SearchControl {
pub order: SearchOrder,
pub seed: u64,
pub max_work: Option<u64>,
pub max_results: Option<usize>,
pub max_frontier: Option<usize>,
pub max_memory_nodes: Option<usize>,
pub max_time: Option<Duration>,
pub branch_and_bound: bool,
pub costs: WorkCosts,
}Expand description
Bounds, ordering, seed, and accounting policy for one search run.
Fields§
§order: SearchOrderDeterministic frontier ordering policy.
seed: u64Caller-supplied seed recorded in the receipt digest.
max_work: Option<u64>Optional maximum charged work.
max_results: Option<usize>Optional maximum number of emitted outputs.
max_frontier: Option<usize>Optional maximum frontier length.
max_memory_nodes: Option<usize>Optional maximum frontier + results node count.
max_time: Option<Duration>Optional wall-clock deadline for the run.
branch_and_bound: boolWhether lower-bound pruning uses the best emitted output score.
costs: WorkCostsPer-operation work charges.
Implementations§
Source§impl SearchControl
impl SearchControl
Sourcepub fn with_order(self, order: SearchOrder) -> SearchControl
pub fn with_order(self, order: SearchOrder) -> SearchControl
Return a copy with a different deterministic frontier order.
Sourcepub fn with_seed(self, seed: u64) -> SearchControl
pub fn with_seed(self, seed: u64) -> SearchControl
Return a copy with a different receipt seed.
Sourcepub fn with_max_work(self, max_work: u64) -> SearchControl
pub fn with_max_work(self, max_work: u64) -> SearchControl
Return a copy with a maximum charged-work bound.
Sourcepub fn with_max_results(self, max_results: usize) -> SearchControl
pub fn with_max_results(self, max_results: usize) -> SearchControl
Return a copy with a maximum emitted-result bound.
Sourcepub fn with_max_frontier(self, max_frontier: usize) -> SearchControl
pub fn with_max_frontier(self, max_frontier: usize) -> SearchControl
Return a copy with a maximum frontier bound.
Sourcepub fn with_max_memory_nodes(self, max_memory_nodes: usize) -> SearchControl
pub fn with_max_memory_nodes(self, max_memory_nodes: usize) -> SearchControl
Return a copy with a maximum frontier + results bound.
Sourcepub fn with_max_time(self, max_time: Duration) -> SearchControl
pub fn with_max_time(self, max_time: Duration) -> SearchControl
Return a copy with a wall-clock deadline.
Sourcepub fn with_branch_and_bound(self, enabled: bool) -> SearchControl
pub fn with_branch_and_bound(self, enabled: bool) -> SearchControl
Return a copy with branch-and-bound pruning enabled or disabled.
Sourcepub fn with_costs(self, costs: WorkCosts) -> SearchControl
pub fn with_costs(self, costs: WorkCosts) -> SearchControl
Return a copy with explicit per-operation work costs.
Trait Implementations§
Source§impl Clone for SearchControl
impl Clone for SearchControl
Source§fn clone(&self) -> SearchControl
fn clone(&self) -> SearchControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchControl
impl Debug for SearchControl
Source§impl Default for SearchControl
impl Default for SearchControl
Source§fn default() -> SearchControl
fn default() -> SearchControl
impl Eq for SearchControl
Source§impl PartialEq for SearchControl
impl PartialEq for SearchControl
impl StructuralPartialEq for SearchControl
Auto Trait Implementations§
impl Freeze for SearchControl
impl RefUnwindSafe for SearchControl
impl Send for SearchControl
impl Sync for SearchControl
impl Unpin for SearchControl
impl UnsafeUnpin for SearchControl
impl UnwindSafe for SearchControl
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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