pub struct PerceptionManager { /* private fields */ }Expand description
Manager for perception states and interactions
Implementations§
Source§impl PerceptionManager
impl PerceptionManager
Sourcepub fn register_perception(&mut self, perception: PerceptionView) -> Result<()>
pub fn register_perception(&mut self, perception: PerceptionView) -> Result<()>
Register a new perception
Sourcepub fn get_perception(
&self,
perception_id: PerceptionId,
) -> Option<&PerceptionView>
pub fn get_perception( &self, perception_id: PerceptionId, ) -> Option<&PerceptionView>
Get a perception by ID
Sourcepub fn update_confidence(
&mut self,
perception_id: PerceptionId,
evidence: PerceptionEvidence,
) -> Result<()>
pub fn update_confidence( &mut self, perception_id: PerceptionId, evidence: PerceptionEvidence, ) -> Result<()>
Update perception confidence based on new evidence
Sourcepub fn acquire_lock(
&mut self,
perception_id: PerceptionId,
session_id: Uuid,
lock_type: PerceptionLockType,
duration_seconds: u64,
) -> Result<bool>
pub fn acquire_lock( &mut self, perception_id: PerceptionId, session_id: Uuid, lock_type: PerceptionLockType, duration_seconds: u64, ) -> Result<bool>
Attempt to acquire a perception lock
Sourcepub fn release_lock(
&mut self,
perception_id: PerceptionId,
session_id: Uuid,
) -> Result<()>
pub fn release_lock( &mut self, perception_id: PerceptionId, session_id: Uuid, ) -> Result<()>
Release a perception lock
Sourcepub fn cleanup_expired_locks(&mut self) -> usize
pub fn cleanup_expired_locks(&mut self) -> usize
Clean up expired locks
Sourcepub fn add_relationship(
&mut self,
from_perception: PerceptionId,
to_perception: PerceptionId,
relationship_type: PerceptionRelationType,
) -> Result<()>
pub fn add_relationship( &mut self, from_perception: PerceptionId, to_perception: PerceptionId, relationship_type: PerceptionRelationType, ) -> Result<()>
Add a relationship between two perceptions
Sourcepub fn find_conflicts(&self, perception_id: PerceptionId) -> Vec<PerceptionId>
pub fn find_conflicts(&self, perception_id: PerceptionId) -> Vec<PerceptionId>
Find perceptions that conflict with a given perception
Sourcepub fn find_supporters(&self, perception_id: PerceptionId) -> Vec<PerceptionId>
pub fn find_supporters(&self, perception_id: PerceptionId) -> Vec<PerceptionId>
Find perceptions that support a given perception
Sourcepub fn get_high_confidence_perceptions(
&self,
threshold: f64,
) -> Vec<PerceptionId>
pub fn get_high_confidence_perceptions( &self, threshold: f64, ) -> Vec<PerceptionId>
Get all perceptions with confidence above a threshold
Sourcepub fn get_statistics(&self) -> PerceptionManagerStats
pub fn get_statistics(&self) -> PerceptionManagerStats
Get statistics about perception states
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PerceptionManager
impl RefUnwindSafe for PerceptionManager
impl Send for PerceptionManager
impl Sync for PerceptionManager
impl Unpin for PerceptionManager
impl UnsafeUnpin for PerceptionManager
impl UnwindSafe for PerceptionManager
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