pub enum MemorySource {
Agent,
User,
System,
Import,
Sync,
}Expand description
Enumerates the five values accepted by the memories.source CHECK constraint.
Adding a new variant requires:
- Updating the DDL CHECK constraint in
migrations/V001__init.sql. - Running a migration that backfills any pre-existing values
(
UPDATE memories SET source='agent' WHERE source NOT IN (...)). - Bumping
crate::constants::CURRENT_SCHEMA_VERSION.
Variants§
Agent
Mutated by an LLM agent (remember, edit, rename, body-enrich).
User
Mutated by a human operator.
System
Mutated by an internal migration or system job.
Import
Inserted by bulk import (ingest, ingest –mode claude-code, ingest –mode codex).
Sync
Inserted by an external sync job.
Implementations§
Source§impl MemorySource
impl MemorySource
Sourcepub const ALL: &'static [MemorySource]
pub const ALL: &'static [MemorySource]
Returns every variant as a static slice, useful for error messages and docs.
Trait Implementations§
Source§impl Clone for MemorySource
impl Clone for MemorySource
Source§fn clone(&self) -> MemorySource
fn clone(&self) -> MemorySource
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 moreimpl Copy for MemorySource
Source§impl Debug for MemorySource
impl Debug for MemorySource
Source§impl<'de> Deserialize<'de> for MemorySource
impl<'de> Deserialize<'de> for MemorySource
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 Display for MemorySource
impl Display for MemorySource
impl Eq for MemorySource
Source§impl Hash for MemorySource
impl Hash for MemorySource
Source§impl PartialEq for MemorySource
impl PartialEq for MemorySource
Source§fn eq(&self, other: &MemorySource) -> bool
fn eq(&self, other: &MemorySource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MemorySource
impl Serialize for MemorySource
impl StructuralPartialEq for MemorySource
Source§impl TryFrom<&str> for MemorySource
Parses a stored memories.source string back into a typed variant.
impl TryFrom<&str> for MemorySource
Parses a stored memories.source string back into a typed variant.
§Errors
Returns AppError::Validation when the input is not one of the five
canonical values. The error message lists every accepted value so the
caller can self-correct without consulting the schema.
Auto Trait Implementations§
impl Freeze for MemorySource
impl RefUnwindSafe for MemorySource
impl Send for MemorySource
impl Sync for MemorySource
impl Unpin for MemorySource
impl UnsafeUnpin for MemorySource
impl UnwindSafe for MemorySource
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more