pub enum MemoryType {
Pattern,
Decision,
Fix,
Context,
}Expand description
Classification of a memory.
Memories are grouped by type in the markdown storage file, each with its own section header.
Variants§
Pattern
How this codebase does things (section: “## Patterns”)
Decision
Why something was chosen (section: “## Decisions”)
Fix
Solution to a recurring problem (section: “## Fixes”)
Context
Project-specific knowledge (section: “## Context”)
Implementations§
Source§impl MemoryType
impl MemoryType
Sourcepub fn section_name(&self) -> &'static str
pub fn section_name(&self) -> &'static str
Returns the markdown section header name for this memory type.
Used when writing memories to .ralph/agent/memories.md.
Sourcepub fn from_section(s: &str) -> Option<Self>
pub fn from_section(s: &str) -> Option<Self>
Parses a section header name into a memory type.
Returns None if the section name doesn’t match any memory type.
Trait Implementations§
Source§impl Clone for MemoryType
impl Clone for MemoryType
Source§fn clone(&self) -> MemoryType
fn clone(&self) -> MemoryType
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 MemoryType
impl Debug for MemoryType
Source§impl Default for MemoryType
impl Default for MemoryType
Source§fn default() -> MemoryType
fn default() -> MemoryType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MemoryType
impl<'de> Deserialize<'de> for MemoryType
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 MemoryType
impl Display for MemoryType
Source§impl FromStr for MemoryType
impl FromStr for MemoryType
Source§impl PartialEq for MemoryType
impl PartialEq for MemoryType
Source§impl Serialize for MemoryType
impl Serialize for MemoryType
impl Copy for MemoryType
impl Eq for MemoryType
impl StructuralPartialEq for MemoryType
Auto Trait Implementations§
impl Freeze for MemoryType
impl RefUnwindSafe for MemoryType
impl Send for MemoryType
impl Sync for MemoryType
impl Unpin for MemoryType
impl UnwindSafe for MemoryType
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<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.