pub struct Conditional<F> {
pub name: &'static str,
/* private fields */
}
Expand description
A simple action performed on the actor.
This transforms the result into either BehaviourResult::Success
or BehaviourResult::Failure
,
depending on the result of the callback function.
Fields§
§name: &'static str
Implementations§
Source§impl<F> Conditional<F>
impl<F> Conditional<F>
pub fn new(name: &'static str, callback: F) -> Conditional<F>
Trait Implementations§
Source§impl<T, F> BehaviourNode<T> for Conditional<F>
impl<T, F> BehaviourNode<T> for Conditional<F>
fn evaluate(&mut self, target: &mut T) -> BehaviourResult
Auto Trait Implementations§
impl<F> Freeze for Conditional<F>where
F: Freeze,
impl<F> RefUnwindSafe for Conditional<F>where
F: RefUnwindSafe,
impl<F> Send for Conditional<F>where
F: Send,
impl<F> Sync for Conditional<F>where
F: Sync,
impl<F> Unpin for Conditional<F>where
F: Unpin,
impl<F> UnwindSafe for Conditional<F>where
F: UnwindSafe,
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