pub struct AgentCharacteristicsKb { /* private fields */ }Expand description
An agent characteristics KB — a log of agent characteristics observed from behaviour (T59).
Implementations§
Source§impl AgentCharacteristicsKb
impl AgentCharacteristicsKb
Sourcepub fn log(&mut self, entry: AgentCharacteristic) -> &mut Self
pub fn log(&mut self, entry: AgentCharacteristic) -> &mut Self
Log a characteristic observation.
Sourcepub fn for_agent(&self, agent_id: &str) -> Vec<&AgentCharacteristic>
pub fn for_agent(&self, agent_id: &str) -> Vec<&AgentCharacteristic>
Get all characteristics for a given agent.
Sourcepub fn latest(&self, agent_id: &str, name: &str) -> Option<&AgentCharacteristic>
pub fn latest(&self, agent_id: &str, name: &str) -> Option<&AgentCharacteristic>
Get the latest value of a named characteristic for an agent.
Sourcepub fn mean(&self, agent_id: &str, name: &str) -> Option<f64>
pub fn mean(&self, agent_id: &str, name: &str) -> Option<f64>
Get the mean value of a named characteristic for an agent.
Sourcepub fn to_value_list(&self) -> Value
pub fn to_value_list(&self) -> Value
All entries as a List of Records.
Trait Implementations§
Source§impl Clone for AgentCharacteristicsKb
impl Clone for AgentCharacteristicsKb
Source§impl Debug for AgentCharacteristicsKb
impl Debug for AgentCharacteristicsKb
Auto Trait Implementations§
impl Freeze for AgentCharacteristicsKb
impl RefUnwindSafe for AgentCharacteristicsKb
impl Send for AgentCharacteristicsKb
impl Sync for AgentCharacteristicsKb
impl Unpin for AgentCharacteristicsKb
impl UnsafeUnpin for AgentCharacteristicsKb
impl UnwindSafe for AgentCharacteristicsKb
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