Public declaration syntax from forge-rs/crates/forge-memory/src/error.rs Original source SHA-256: 74763802b154c88707491bacd70ddb025f019812cb86fc2c2821f77e3cabb58e Function bodies and constant values are omitted. This is not the complete implementation. Source line 9 #[derive(Debug, Error)] pub enum MemoryError { /// A memory entry was not found. #[error("memory entry '{memory_id}' not found in scope '{scope}'")] NotFound { /// The memory ID that was looked up. memory_id: String, /// The scope that was searched. scope: String, }, /// Access to a memory scope was denied. #[error("agent '{agent_id}' denied access to memory scope '{scope}': {reason}")] AccessDenied { /// The agent that was denied. agent_id: String, /// The scope that was requested. scope: String, /// Why access was denied. reason: String, }, /// A write-back operation failed. #[error("write-back failed for entry '{memory_id}' in scope '{scope}': {reason}")] WriteBackFailed { /// The memory ID that failed to persist. memory_id: String, /// The scope the entry was in. scope: String, /// What went wrong. reason: String, }, /// The memory store backend returned an error. #[error("memory store error: {reason}")] StoreError { /// The backend error description. reason: String, }, /// A memory query was invalid. #[error("invalid memory query: {reason}")] InvalidQuery { /// What is wrong with the query. reason: String, }, /// Serialization or deserialization failed. #[error("memory serialization error: {0}")] Serialization(#[from] serde_json::Error), } Source line 61 pub type MemoryResult = Result;