pub struct AgentDiary {
pub agent_id: String,
pub agent_type: String,
pub project_root: String,
pub entries: Vec<DiaryEntry>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Fields§
§agent_id: String§agent_type: String§project_root: String§entries: Vec<DiaryEntry>§created_at: DateTime<Utc>§updated_at: DateTime<Utc>Implementations§
Source§impl AgentDiary
impl AgentDiary
pub fn new(agent_id: &str, agent_type: &str, project_root: &str) -> Self
pub fn add_entry( &mut self, entry_type: DiaryEntryType, content: &str, context: Option<&str>, )
pub fn format_summary(&self) -> String
pub fn format_compact(&self) -> String
pub fn save(&self) -> Result<(), String>
pub fn load(agent_id: &str) -> Option<Self>
pub fn load_or_create( agent_id: &str, agent_type: &str, project_root: &str, ) -> Self
pub fn list_all() -> Vec<(String, usize, DateTime<Utc>)>
Trait Implementations§
Source§impl Clone for AgentDiary
impl Clone for AgentDiary
Source§fn clone(&self) -> AgentDiary
fn clone(&self) -> AgentDiary
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 AgentDiary
impl Debug for AgentDiary
Source§impl<'de> Deserialize<'de> for AgentDiary
impl<'de> Deserialize<'de> for AgentDiary
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
Auto Trait Implementations§
impl Freeze for AgentDiary
impl RefUnwindSafe for AgentDiary
impl Send for AgentDiary
impl Sync for AgentDiary
impl Unpin for AgentDiary
impl UnsafeUnpin for AgentDiary
impl UnwindSafe for AgentDiary
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