pub struct MemoryDelta {
pub tier: Option<Tier>,
pub namespace: Option<String>,
pub title: Option<String>,
pub content: Option<String>,
pub tags: Option<Vec<String>>,
pub priority: Option<i32>,
pub confidence: Option<f64>,
pub source: Option<String>,
pub expires_at: Option<String>,
pub metadata: Option<Value>,
}Expand description
Writable delta a pre_store hook may mutate before the row is
persisted.
Mirrors the user-controllable fields of crate::models::CreateMemory
— but as a JSON-friendly bag with every field optional so a hook
can return a partial diff (e.g. just rewriting tags) without
echoing the whole memory back over stdio. The executor (G3)
merges Some(_) fields onto the in-flight CreateMemory
before calling db::insert.
Fields§
§tier: Option<Tier>§namespace: Option<String>§title: Option<String>§content: Option<String>§priority: Option<i32>§confidence: Option<f64>§source: Option<String>§expires_at: Option<String>§metadata: Option<Value>Trait Implementations§
Source§impl Clone for MemoryDelta
impl Clone for MemoryDelta
Source§fn clone(&self) -> MemoryDelta
fn clone(&self) -> MemoryDelta
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 MemoryDelta
impl Debug for MemoryDelta
Source§impl Default for MemoryDelta
impl Default for MemoryDelta
Source§fn default() -> MemoryDelta
fn default() -> MemoryDelta
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MemoryDelta
impl<'de> Deserialize<'de> for MemoryDelta
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 MemoryDelta
impl PartialEq for MemoryDelta
Source§fn eq(&self, other: &MemoryDelta) -> bool
fn eq(&self, other: &MemoryDelta) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MemoryDelta
impl Serialize for MemoryDelta
impl StructuralPartialEq for MemoryDelta
Auto Trait Implementations§
impl Freeze for MemoryDelta
impl RefUnwindSafe for MemoryDelta
impl Send for MemoryDelta
impl Sync for MemoryDelta
impl Unpin for MemoryDelta
impl UnsafeUnpin for MemoryDelta
impl UnwindSafe for MemoryDelta
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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