pub struct ToCompletion;
Expand description
A struct implementing RunCondition
which always returns true
.
This means that the bot will always run until the best action was found.
§Examples
let tree = Node::root().with_children(&[
Node::new(false, 7).with_children(&[
Node::new(true, 4),
Node::new(true, 2),
]),
Node::new(false, 5).with_children(&[
Node::new(true, 8),
Node::new(true, 9)
]),
]);
let mut bot = Bot::new(true);
assert_eq!(bot.select(&tree, ToCompletion), Some(1));
Trait Implementations§
Source§impl Clone for ToCompletion
impl Clone for ToCompletion
Source§fn clone(&self) -> ToCompletion
fn clone(&self) -> ToCompletion
Returns a copy 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 ToCompletion
impl Debug for ToCompletion
Source§impl RunCondition for ToCompletion
impl RunCondition for ToCompletion
impl Copy for ToCompletion
Auto Trait Implementations§
impl Freeze for ToCompletion
impl RefUnwindSafe for ToCompletion
impl Send for ToCompletion
impl Sync for ToCompletion
impl Unpin for ToCompletion
impl UnwindSafe for ToCompletion
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> IntoRunCondition for Twhere
T: RunCondition,
impl<T> IntoRunCondition for Twhere
T: RunCondition,
type RunCondition = T
Source§fn into_run_condition(self) -> T
fn into_run_condition(self) -> T
consumes
self
and returns a RunCondition
.