pub struct RawStatusLine {
pub session_id: String,
pub transcript_path: Option<String>,
pub cwd: Option<String>,
pub model: Option<RawModel>,
pub workspace: Option<RawWorkspace>,
pub version: Option<String>,
pub cost: Option<RawCost>,
pub context_window: Option<RawContextWindow>,
pub exceeds_200k_tokens: Option<bool>,
pub pid: Option<u32>,
pub tmux_pane: Option<String>,
}Expand description
Raw status line JSON structure from Claude Code.
Based on validated integration testing (Week 1). All fields except session_id are optional to handle partial updates.
Fields§
§session_id: String§transcript_path: Option<String>§cwd: Option<String>§model: Option<RawModel>§workspace: Option<RawWorkspace>§version: Option<String>§cost: Option<RawCost>§context_window: Option<RawContextWindow>§exceeds_200k_tokens: Option<bool>§pid: Option<u32>Process ID of the Claude Code process (injected by status line script via $PPID)
tmux_pane: Option<String>Tmux pane ID (injected by hook script via $TMUX_PANE)
Implementations§
Source§impl RawStatusLine
impl RawStatusLine
Sourcepub fn to_status_line_data(&self) -> Option<StatusLineData>
pub fn to_status_line_data(&self) -> Option<StatusLineData>
Converts raw JSON data to a StatusLineData struct.
Returns None if required fields (model) are missing.
Sourcepub fn to_session_domain(&self) -> Option<SessionDomain>
pub fn to_session_domain(&self) -> Option<SessionDomain>
Converts to SessionDomain. Returns None if required fields (model) are missing.
Sourcepub fn update_session(&self, session: &mut SessionDomain)
pub fn update_session(&self, session: &mut SessionDomain)
Updates an existing SessionDomain with new data. Only updates fields that are present in this status line.
Trait Implementations§
Source§impl Clone for RawStatusLine
impl Clone for RawStatusLine
Source§fn clone(&self) -> RawStatusLine
fn clone(&self) -> RawStatusLine
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 RawStatusLine
impl Debug for RawStatusLine
Source§impl<'de> Deserialize<'de> for RawStatusLine
impl<'de> Deserialize<'de> for RawStatusLine
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 RawStatusLine
impl RefUnwindSafe for RawStatusLine
impl Send for RawStatusLine
impl Sync for RawStatusLine
impl Unpin for RawStatusLine
impl UnsafeUnpin for RawStatusLine
impl UnwindSafe for RawStatusLine
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