pub enum Behavior<T> {
Wait {
curr: f64,
max: f64,
},
RandomWait {
curr: f64,
curr_max: f64,
max: f64,
},
Cond(String, fn(&T) -> bool, Rc<RefCell<Node<T>>>, Rc<RefCell<Node<T>>>),
Sequence(usize, Vec<Rc<RefCell<Node<T>>>>),
Select(usize, Vec<Rc<RefCell<Node<T>>>>),
Action(String, fn(&mut T) -> Status),
ActionSuccess(String, fn(&mut T)),
StatefulAction(String, Box<dyn StatefulAction<T>>),
While(Box<dyn Fn(&T) -> bool>, Rc<RefCell<Node<T>>>),
}
Variants§
Wait
RandomWait
Cond(String, fn(&T) -> bool, Rc<RefCell<Node<T>>>, Rc<RefCell<Node<T>>>)
Sequence(usize, Vec<Rc<RefCell<Node<T>>>>)
Select(usize, Vec<Rc<RefCell<Node<T>>>>)
Action(String, fn(&mut T) -> Status)
ActionSuccess(String, fn(&mut T))
StatefulAction(String, Box<dyn StatefulAction<T>>)
While(Box<dyn Fn(&T) -> bool>, Rc<RefCell<Node<T>>>)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Behavior<T>
impl<T> !RefUnwindSafe for Behavior<T>
impl<T> !Send for Behavior<T>
impl<T> !Sync for Behavior<T>
impl<T> Unpin for Behavior<T>
impl<T> !UnwindSafe for Behavior<T>
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