pub struct HealthCheckBehavior { /* private fields */ }Expand description
Health check behavior
Implementations§
Source§impl HealthCheckBehavior
impl HealthCheckBehavior
pub fn new() -> Self
pub fn with_healthy_states(self, states: Vec<AgentState>) -> Self
Trait Implementations§
Source§impl Behavior for HealthCheckBehavior
impl Behavior for HealthCheckBehavior
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get behavior description
Source§fn execute(&self, context: &BehaviorContext) -> BehaviorResult
fn execute(&self, context: &BehaviorContext) -> BehaviorResult
Execute the behavior
Source§fn can_execute(&self, _context: &BehaviorContext) -> bool
fn can_execute(&self, _context: &BehaviorContext) -> bool
Check if behavior can execute in current context
Source§fn on_attach(&self, _agent_id: AgentId) -> BehaviorResult
fn on_attach(&self, _agent_id: AgentId) -> BehaviorResult
Called when behavior is attached to an agent
Source§fn on_detach(&self, _agent_id: AgentId) -> BehaviorResult
fn on_detach(&self, _agent_id: AgentId) -> BehaviorResult
Called when behavior is detached from an agent
Auto Trait Implementations§
impl Freeze for HealthCheckBehavior
impl RefUnwindSafe for HealthCheckBehavior
impl Send for HealthCheckBehavior
impl Sync for HealthCheckBehavior
impl Unpin for HealthCheckBehavior
impl UnwindSafe for HealthCheckBehavior
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