pub struct ParsedSession {
pub session_id: String,
pub tool_version: Option<String>,
pub cwd: String,
pub git_branch: Option<String>,
pub model: Option<String>,
pub messages: Vec<ParsedMessage>,
pub source_path: String,
}Expand description
Intermediate representation of a parsed session.
Contains all extracted data from a Claude Code session file before
conversion to storage models. Use to_storage_models
to convert to database-ready structures.
Fields§
§session_id: String§tool_version: Option<String>§cwd: String§git_branch: Option<String>§model: Option<String>§messages: Vec<ParsedMessage>§source_path: StringImplementations§
Source§impl ParsedSession
impl ParsedSession
Sourcepub fn to_storage_models(&self) -> (Session, Vec<Message>)
pub fn to_storage_models(&self) -> (Session, Vec<Message>)
Converts this parsed session to storage-ready models.
Returns a tuple of (Session, Vec<Message>) suitable for database insertion.
Generates UUIDs from the session ID string if valid, otherwise creates new ones.
Also builds parent-child relationships between messages.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedSession
impl RefUnwindSafe for ParsedSession
impl Send for ParsedSession
impl Sync for ParsedSession
impl Unpin for ParsedSession
impl UnwindSafe for ParsedSession
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