pub struct KernelState {
pub memories: Vec<Mem>,
pub reflected_ids: Vec<String>,
pub last_reflection_at: Option<String>,
pub last_curated_at: Option<String>,
pub warnings: Vec<Warning>,
pub sessions: Vec<SessionInfo>,
pub pending_facts: Vec<Value>,
pub skills: Option<Vec<Value>>,
pub goals: Option<Vec<Value>>,
}Expand description
D-HIVE 内核状态 — kernel-state.json 的完整模型
Fields§
§memories: Vec<Mem>§reflected_ids: Vec<String>§last_reflection_at: Option<String>§last_curated_at: Option<String>§warnings: Vec<Warning>§sessions: Vec<SessionInfo>§pending_facts: Vec<Value>§skills: Option<Vec<Value>>§goals: Option<Vec<Value>>Implementations§
Source§impl KernelState
impl KernelState
Sourcepub fn list_active(&self) -> Vec<&Mem>
pub fn list_active(&self) -> Vec<&Mem>
返回活跃记忆列表 (未被超越的记忆)
Sourcepub fn find_mem_mut(&mut self, id: &str) -> Option<&mut Mem>
pub fn find_mem_mut(&mut self, id: &str) -> Option<&mut Mem>
通过 ID (精确或后 8 位) 查找可变引用
Trait Implementations§
Source§impl Clone for KernelState
impl Clone for KernelState
Source§fn clone(&self) -> KernelState
fn clone(&self) -> KernelState
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 KernelState
impl Debug for KernelState
Source§impl<'de> Deserialize<'de> for KernelState
impl<'de> Deserialize<'de> for KernelState
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 KernelState
impl RefUnwindSafe for KernelState
impl Send for KernelState
impl Sync for KernelState
impl Unpin for KernelState
impl UnsafeUnpin for KernelState
impl UnwindSafe for KernelState
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