pub struct BtDebugger {
pub is_attached: bool,
pub agent_id: Option<u64>,
pub breakpoints: HashSet<u32>,
pub step_mode: bool,
pub last_tick_nodes: Vec<u32>,
pub node_exec_counts: HashMap<u32, u64>,
pub node_status_history: HashMap<u32, VecDeque<BtStatus>>,
pub status_history_len: usize,
pub paused_at_node: Option<u32>,
pub play_speed: f32,
}Fields§
§is_attached: bool§agent_id: Option<u64>§breakpoints: HashSet<u32>§step_mode: bool§last_tick_nodes: Vec<u32>§node_exec_counts: HashMap<u32, u64>§node_status_history: HashMap<u32, VecDeque<BtStatus>>§status_history_len: usize§paused_at_node: Option<u32>§play_speed: f32Implementations§
Source§impl BtDebugger
impl BtDebugger
pub fn new() -> Self
pub fn attach(&mut self, agent_id: u64)
pub fn detach(&mut self)
pub fn toggle_breakpoint(&mut self, node_id: u32)
pub fn record_tick(&mut self, visited: &[u32], tree: &BehaviorTree)
pub fn check_breakpoints(&mut self, visited: &[u32]) -> bool
pub fn get_node_coverage(&self, tree: &BehaviorTree) -> f32
pub fn hot_nodes(&self, top_n: usize) -> Vec<(u32, u64)>
pub fn node_success_rate(&self, node_id: u32) -> f32
Auto Trait Implementations§
impl Freeze for BtDebugger
impl RefUnwindSafe for BtDebugger
impl Send for BtDebugger
impl Sync for BtDebugger
impl Unpin for BtDebugger
impl UnsafeUnpin for BtDebugger
impl UnwindSafe for BtDebugger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.