pub struct MemoryInput {Show 14 fields
pub content: String,
pub id: Option<String>,
pub tags: Vec<String>,
pub importance: f64,
pub metadata: Value,
pub event_type: Option<EventType>,
pub session_id: Option<String>,
pub project: Option<String>,
pub priority: Option<i32>,
pub entity_id: Option<String>,
pub agent_type: Option<String>,
pub ttl_seconds: Option<i64>,
pub referenced_date: Option<String>,
pub source_type: Option<String>,
}Fields§
§content: String§id: Option<String>§importance: f64§metadata: Value§event_type: Option<EventType>§session_id: Option<String>§project: Option<String>§priority: Option<i32>§entity_id: Option<String>§agent_type: Option<String>§ttl_seconds: Option<i64>§referenced_date: Option<String>ISO 8601 timestamp for when the event actually occurred.
When provided, this overrides the default event_at = now() on insert.
source_type: Option<String>Source of the memory (e.g. “cli_input”, “mcp”, “import”). Defaults to “cli_input”.
Implementations§
Source§impl MemoryInput
impl MemoryInput
Sourcepub fn apply_event_type_defaults(&mut self, event_type_str: Option<&str>)
pub fn apply_event_type_defaults(&mut self, event_type_str: Option<&str>)
Sets event_type from event_type_str when provided, otherwise preserves the
existing self.event_type. Then applies derived defaults for ttl_seconds and
priority (only when those fields are None) based on the effective event type.
Trait Implementations§
Source§impl Clone for MemoryInput
impl Clone for MemoryInput
Source§fn clone(&self) -> MemoryInput
fn clone(&self) -> MemoryInput
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 MemoryInput
impl Debug for MemoryInput
Auto Trait Implementations§
impl Freeze for MemoryInput
impl RefUnwindSafe for MemoryInput
impl Send for MemoryInput
impl Sync for MemoryInput
impl Unpin for MemoryInput
impl UnsafeUnpin for MemoryInput
impl UnwindSafe for MemoryInput
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