pub struct LiveSession {
pub pid: u32,
pub start_time: DateTime<Local>,
pub working_directory: Option<String>,
pub command: String,
pub cpu_percent: f64,
pub memory_mb: u64,
pub tokens: Option<u64>,
pub session_id: Option<String>,
pub session_name: Option<String>,
pub session_type: SessionType,
pub model: Option<String>,
pub resume_id: Option<String>,
}Expand description
Represents a live Claude Code session (running process)
Fields§
§pid: u32Process ID
start_time: DateTime<Local>Time when the process started
working_directory: Option<String>Working directory of the process (if detectable)
command: StringFull command line
cpu_percent: f64CPU usage percentage
memory_mb: u64Memory usage in MB
tokens: Option<u64>Total tokens in active session (if detectable)
session_id: Option<String>Session ID (from JSONL filename)
session_name: Option<String>Session name/title (from session_start event)
session_type: SessionTypeType of session (CLI / IDE / Agent), detected from CLI flags
model: Option<String>Model in use (from –model flag, if present)
resume_id: Option<String>Resume session ID (from –resume flag, may differ from session_id)
Trait Implementations§
Source§impl Clone for LiveSession
impl Clone for LiveSession
Source§fn clone(&self) -> LiveSession
fn clone(&self) -> LiveSession
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 moreAuto Trait Implementations§
impl Freeze for LiveSession
impl RefUnwindSafe for LiveSession
impl Send for LiveSession
impl Sync for LiveSession
impl Unpin for LiveSession
impl UnsafeUnpin for LiveSession
impl UnwindSafe for LiveSession
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