pub struct SubTree;Expand description
A Subtree is a placeholder for behavior (sub)trees with its own BehaviorKind.
Implementations§
Trait Implementations§
Source§impl Behavior for SubTree
impl Behavior for SubTree
Source§fn on_start(
&mut self,
behavior: &mut BehaviorData,
children: &mut BehaviorTreeElementList,
_runtime: &Arc<Mutex<Runtime>>,
) -> Result<(), Error>
fn on_start( &mut self, behavior: &mut BehaviorData, children: &mut BehaviorTreeElementList, _runtime: &Arc<Mutex<Runtime>>, ) -> Result<(), Error>
Method is called before starting to tick a behavior,
intended to do preliminary stuff for your behavior. Read more
Source§fn tick<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_behavior: &'life1 mut BehaviorData,
children: &'life2 mut BehaviorTreeElementList,
runtime: &'life3 Arc<Mutex<Runtime>>,
) -> Pin<Box<dyn Future<Output = Result<BehaviorState, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
SubTree: 'async_trait,
fn tick<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
_behavior: &'life1 mut BehaviorData,
children: &'life2 mut BehaviorTreeElementList,
runtime: &'life3 Arc<Mutex<Runtime>>,
) -> Pin<Box<dyn Future<Output = Result<BehaviorState, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
SubTree: 'async_trait,
Method to tick a behavior. Read more
Source§fn on_halt(&mut self) -> Result<(), Error>
fn on_halt(&mut self) -> Result<(), Error>
Method called during stop/cancel/halt of a behavior,
intended to reset the internal fields of your behavior. Read more
Source§fn start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
behavior: &'life1 mut BehaviorData,
children: &'life2 mut BehaviorTreeElementList,
runtime: &'life3 Arc<Mutex<Runtime>>,
) -> Pin<Box<dyn Future<Output = Result<BehaviorState, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn start<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 mut self,
behavior: &'life1 mut BehaviorData,
children: &'life2 mut BehaviorTreeElementList,
runtime: &'life3 Arc<Mutex<Runtime>>,
) -> Pin<Box<dyn Future<Output = Result<BehaviorState, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Method is called on first tick of a behavior instead of
tick().
If this method returns BehaviorState::Running, the
behavior becomes asynchronous. Read moreSource§fn halt(
&mut self,
_behavior: &mut BehaviorData,
children: &mut BehaviorTreeElementList,
runtime: &Arc<Mutex<Runtime>>,
) -> Result<BehaviorState, Error>
fn halt( &mut self, _behavior: &mut BehaviorData, children: &mut BehaviorTreeElementList, runtime: &Arc<Mutex<Runtime>>, ) -> Result<BehaviorState, Error>
Method to halt a behavior. Read more
Source§impl BehaviorExecution for SubTree
impl BehaviorExecution for SubTree
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Mutable dynamic downcasting.
Source§fn kind(&self) -> BehaviorKind
fn kind(&self) -> BehaviorKind
Get the
BehaviorKind of the behavior.Source§fn portlist_mut(&mut self) -> &mut dyn PortList
fn portlist_mut(&mut self) -> &mut dyn PortList
Access the
PortListAuto Trait Implementations§
impl Freeze for SubTree
impl RefUnwindSafe for SubTree
impl Send for SubTree
impl Sync for SubTree
impl Unpin for SubTree
impl UnsafeUnpin for SubTree
impl UnwindSafe for SubTree
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