pub struct Belief {
pub belief_id: BeliefId,
pub agent_id: AgentId,
pub belief_type: BeliefType,
pub content: String,
pub confidence: f32,
pub source: BeliefSource,
pub evidence_refs: Vec<EvidenceRef>,
pub created_at: Timestamp,
pub updated_at: Timestamp,
pub superseded_by: Option<BeliefId>,
}Expand description
A belief held by an agent.
Fields§
§belief_id: BeliefIdUnique identifier for this belief
agent_id: AgentIdAgent holding this belief
belief_type: BeliefTypeType of belief
content: StringContent of the belief
confidence: f32Confidence level (0.0 to 1.0)
source: BeliefSourceSource of the belief
evidence_refs: Vec<EvidenceRef>Evidence supporting this belief
created_at: TimestampWhen this belief was formed
updated_at: TimestampWhen last updated
superseded_by: Option<BeliefId>Belief that supersedes this one (if any)
Implementations§
Source§impl Belief
impl Belief
Sourcepub fn new(
agent_id: AgentId,
content: impl Into<String>,
belief_type: BeliefType,
source: BeliefSource,
) -> Self
pub fn new( agent_id: AgentId, content: impl Into<String>, belief_type: BeliefType, source: BeliefSource, ) -> Self
Create a new belief.
Sourcepub fn with_confidence(self, confidence: f32) -> Self
pub fn with_confidence(self, confidence: f32) -> Self
Set confidence level.
Sourcepub fn with_evidence(self, evidence: EvidenceRef) -> Self
pub fn with_evidence(self, evidence: EvidenceRef) -> Self
Add evidence reference.
Sourcepub fn update_confidence(&mut self, confidence: f32)
pub fn update_confidence(&mut self, confidence: f32)
Update confidence.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Belief
impl<'de> Deserialize<'de> for Belief
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Belief
Auto Trait Implementations§
impl Freeze for Belief
impl RefUnwindSafe for Belief
impl Send for Belief
impl Sync for Belief
impl Unpin for Belief
impl UnwindSafe for Belief
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