Trait myopic_brain::SearchTerminator [−][src]
pub trait SearchTerminator { fn should_terminate(&self, ctx: &SearchContext) -> bool; }
Represents some object which can determine whether a search should be terminated given certain context about the current state. Implementations are provided for Duration (caps the search based on time elapsed), for usize which represents a maximum search depth and for a pair (Duration, usize) which combines both checks.
Required methods
fn should_terminate(&self, ctx: &SearchContext) -> bool
[src]
Implementations on Foreign Types
impl SearchTerminator for Duration
[src]
impl SearchTerminator for Duration
[src]fn should_terminate(&self, ctx: &SearchContext) -> bool
[src]
impl SearchTerminator for usize
[src]
impl SearchTerminator for usize
[src]fn should_terminate(&self, ctx: &SearchContext) -> bool
[src]
impl SearchTerminator for (Duration, usize)
[src]
impl SearchTerminator for (Duration, usize)
[src]