pub struct NewExperience {
pub collective_id: CollectiveId,
pub content: String,
pub experience_type: ExperienceType,
pub embedding: Option<Vec<f32>>,
pub importance: f32,
pub confidence: f32,
pub domain: Vec<String>,
pub related_files: Vec<String>,
pub source_agent: AgentId,
pub source_task: Option<TaskId>,
}Expand description
Input for creating a new experience via PulseDB::record_experience().
Only the mutable fields are set here. The id, timestamp, applications,
and archived fields are set automatically by the storage layer.
§Embedding
- External provider:
embeddingis required (must beSome) - Builtin provider:
embeddingis optional; ifNone, PulseDB generates it
Fields§
§collective_id: CollectiveIdThe collective to store this experience in.
content: StringThe experience content (text).
experience_type: ExperienceTypeRich experience type.
embedding: Option<Vec<f32>>Pre-computed embedding vector. Required for External provider.
importance: f32Importance score (0.0–1.0).
confidence: f32Confidence score (0.0–1.0).
domain: Vec<String>Domain tags for categorical filtering.
Related source file paths.
source_agent: AgentIdThe agent creating this experience.
source_task: Option<TaskId>Optional task context.
Trait Implementations§
Source§impl Clone for NewExperience
impl Clone for NewExperience
Source§fn clone(&self) -> NewExperience
fn clone(&self) -> NewExperience
Returns a duplicate of the value. Read more
1.0.0 · 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 NewExperience
impl Debug for NewExperience
Auto Trait Implementations§
impl Freeze for NewExperience
impl RefUnwindSafe for NewExperience
impl Send for NewExperience
impl Sync for NewExperience
impl Unpin for NewExperience
impl UnsafeUnpin for NewExperience
impl UnwindSafe for NewExperience
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
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>
Converts
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>
Converts
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