pub struct NegativeKnowledge {
pub category: String,
pub constraint: String,
pub severity: Severity,
pub source: String,
pub context: String,
pub created_at: String,
}Expand description
A structured constraint — something the agent learned NOT to do.
Stored in the Negative Knowledge Store, queryable by category. Unlike free-text notes, these are structured rows that lobes can filter: “give me all Critical constraints for category=API”.
§Example
use pe_core::self_model::{NegativeKnowledge, Severity};
let constraint = NegativeKnowledge::new(
"api_calls",
"Never send more than 100 items per batch",
Severity::High,
);
assert_eq!(constraint.category, "api_calls");Fields§
§category: StringClassification for structured queries.
constraint: StringThe constraint itself.
severity: SeverityHow important this constraint is.
source: StringWhere this constraint came from (e.g., “user feedback”, “execution failure”).
context: StringAdditional context about when/why this applies.
created_at: StringISO 8601 timestamp when recorded.
Implementations§
Trait Implementations§
Source§impl Clone for NegativeKnowledge
impl Clone for NegativeKnowledge
Source§fn clone(&self) -> NegativeKnowledge
fn clone(&self) -> NegativeKnowledge
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 moreSource§impl Debug for NegativeKnowledge
impl Debug for NegativeKnowledge
Source§impl<'de> Deserialize<'de> for NegativeKnowledge
impl<'de> Deserialize<'de> for NegativeKnowledge
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
Source§impl PartialEq for NegativeKnowledge
impl PartialEq for NegativeKnowledge
Source§fn eq(&self, other: &NegativeKnowledge) -> bool
fn eq(&self, other: &NegativeKnowledge) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NegativeKnowledge
impl Serialize for NegativeKnowledge
impl StructuralPartialEq for NegativeKnowledge
Auto Trait Implementations§
impl Freeze for NegativeKnowledge
impl RefUnwindSafe for NegativeKnowledge
impl Send for NegativeKnowledge
impl Sync for NegativeKnowledge
impl Unpin for NegativeKnowledge
impl UnsafeUnpin for NegativeKnowledge
impl UnwindSafe for NegativeKnowledge
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