pub struct SituationRoom { /* private fields */ }Expand description
Aggregates sensor data from agents for decision making.
Each agent reports a ternary value representing their local situation. The situation room aggregates these into a fleet-wide picture.
Implementations§
Source§impl SituationRoom
impl SituationRoom
pub fn new() -> Self
Sourcepub fn report_count(&self) -> usize
pub fn report_count(&self) -> usize
Number of reports received.
Sourcepub fn distribution(&self) -> (usize, usize, usize)
pub fn distribution(&self) -> (usize, usize, usize)
Distribution of reports: (negative_count, zero_count, positive_count).
Trait Implementations§
Source§impl Clone for SituationRoom
impl Clone for SituationRoom
Source§fn clone(&self) -> SituationRoom
fn clone(&self) -> SituationRoom
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SituationRoom
impl RefUnwindSafe for SituationRoom
impl Send for SituationRoom
impl Sync for SituationRoom
impl Unpin for SituationRoom
impl UnsafeUnpin for SituationRoom
impl UnwindSafe for SituationRoom
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