pub struct Thread {
pub thread_id: ThreadId,
pub leaf_id: Option<String>,
pub journal: Journal,
pub model: String,
pub reasoning_effort: Option<String>,
pub workspace: PathBuf,
pub ephemeral: bool,
}Expand description
Durable thread (the former Session). One per conversation, persisted in
state.threads. The only new field vs the old Session is leaf_id — the
journal cursor — plus the typed ThreadId. All other fields keep their
persisted JSON shape unchanged.
Fields§
§thread_id: ThreadId§leaf_id: Option<String>Active branch tip. None before the first journal header.
journal: JournalJournal (append-only). In-memory projection of the persisted
threads/turns/items/events layout is derived root→leaf.
model: String§reasoning_effort: Option<String>§workspace: PathBuf§ephemeral: boolImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Thread
impl<'de> Deserialize<'de> for Thread
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 Thread
impl RefUnwindSafe for Thread
impl Send for Thread
impl Sync for Thread
impl Unpin for Thread
impl UnsafeUnpin for Thread
impl UnwindSafe for Thread
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