pub struct UpdateSession {
pub title: Option<String>,
pub title_pinned: Option<bool>,
pub cwd: Option<String>,
pub model: Option<String>,
pub parent_session_id: Option<SessionId>,
pub session_type: Option<SessionType>,
pub project_scope: Option<String>,
pub usage_input: Option<u64>,
pub usage_output: Option<u64>,
pub usage_cost_usd_micros: Option<u64>,
}Expand description
Typed mutable facts for an existing session.
Omitted fields are preserved. Clearing metadata is deliberately not part of this contract; lifecycle operations own destructive state transitions.
Fields§
§title: Option<String>§title_pinned: Option<bool>Whether title is a person’s choice, which decides who may overwrite
whom. Leaving this None marks the write as derived — a title
generated from session content — and derived writes never overwrite a
pinned title. That default is what makes an auto-titling caller
fail-safe without having to know pinning exists.
title | title_pinned | effect |
|---|---|---|
Some | Some(true) | rename: set the title and pin it |
Some | Some(false) | retitle and release the pin |
None | Some(_) | change the pin state, keep the title |
Some | None | derived: applied only while unpinned |
None | None | no title change |
cwd: Option<String>§model: Option<String>§parent_session_id: Option<SessionId>§session_type: Option<SessionType>§project_scope: Option<String>§usage_input: Option<u64>§usage_output: Option<u64>§usage_cost_usd_micros: Option<u64>Trait Implementations§
Source§impl Clone for UpdateSession
impl Clone for UpdateSession
Source§fn clone(&self) -> UpdateSession
fn clone(&self) -> UpdateSession
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 UpdateSession
impl Debug for UpdateSession
Source§impl Default for UpdateSession
impl Default for UpdateSession
Source§fn default() -> UpdateSession
fn default() -> UpdateSession
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UpdateSession
impl<'de> Deserialize<'de> for UpdateSession
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
impl Eq for UpdateSession
Source§impl PartialEq for UpdateSession
impl PartialEq for UpdateSession
Source§impl Serialize for UpdateSession
impl Serialize for UpdateSession
impl StructuralPartialEq for UpdateSession
Auto Trait Implementations§
impl Freeze for UpdateSession
impl RefUnwindSafe for UpdateSession
impl Send for UpdateSession
impl Sync for UpdateSession
impl Unpin for UpdateSession
impl UnsafeUnpin for UpdateSession
impl UnwindSafe for UpdateSession
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