pub enum ExperienceType {
Difficulty {
description: String,
severity: Severity,
},
Solution {
problem_ref: Option<ExperienceId>,
approach: String,
worked: bool,
},
ErrorPattern {
signature: String,
fix: String,
prevention: String,
},
SuccessPattern {
task_type: String,
approach: String,
quality: f32,
},
UserPreference {
category: String,
preference: String,
strength: f32,
},
ArchitecturalDecision {
decision: String,
rationale: String,
},
TechInsight {
technology: String,
insight: String,
},
Fact {
statement: String,
source: String,
},
Generic {
category: Option<String>,
},
}Expand description
Rich experience type with associated data per variant.
This is the full type stored in the experience record. For index keys,
use type_tag() to get the compact
ExperienceTypeTag discriminant.
§Variants
Each variant carries structured data specific to that kind of experience:
- Difficulty — A problem the agent encountered
- Solution — A fix for a problem, optionally linked to a Difficulty
- ErrorPattern — A reusable error signature with fix and prevention
- SuccessPattern — A proven approach with quality rating
- UserPreference — A user preference with strength
- ArchitecturalDecision — A design decision with rationale
- TechInsight — Technical knowledge about a technology
- Fact — A verified factual statement with source
- Generic — Catch-all for uncategorized experiences
Variants§
Difficulty
Problem encountered by the agent.
Solution
Fix for a problem, optionally linked to a Difficulty experience.
Fields
problem_ref: Option<ExperienceId>Reference to the Difficulty experience this solves, if any.
ErrorPattern
Reusable error signature with fix and prevention strategy.
Fields
SuccessPattern
Proven approach with quality rating (0.0–1.0).
Fields
UserPreference
User preference with strength (0.0–1.0).
Fields
ArchitecturalDecision
Design decision with rationale.
TechInsight
Technical knowledge about a specific technology.
Fields
Fact
Verified factual statement with source attribution.
Generic
Catch-all for uncategorized experiences.
Implementations§
Source§impl ExperienceType
impl ExperienceType
Sourcepub fn type_tag(&self) -> ExperienceTypeTag
pub fn type_tag(&self) -> ExperienceTypeTag
Returns the compact ExperienceTypeTag for use in index keys.
This bridges the rich type (with data) to the 1-byte discriminant stored in secondary index keys.
Trait Implementations§
Source§impl Clone for ExperienceType
impl Clone for ExperienceType
Source§fn clone(&self) -> ExperienceType
fn clone(&self) -> ExperienceType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExperienceType
impl Debug for ExperienceType
Source§impl Default for ExperienceType
impl Default for ExperienceType
Source§impl<'de> Deserialize<'de> for ExperienceType
impl<'de> Deserialize<'de> for ExperienceType
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>,
Auto Trait Implementations§
impl Freeze for ExperienceType
impl RefUnwindSafe for ExperienceType
impl Send for ExperienceType
impl Sync for ExperienceType
impl Unpin for ExperienceType
impl UnsafeUnpin for ExperienceType
impl UnwindSafe for ExperienceType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more