Skip to main content

Module session

Module session 

Source

Structs§

SessionData
Session file content persisted between CLI invocations.

Enums§

SessionError
Errors that can occur during session file operations.

Functions§

delete_session
Delete the session file. Returns Ok(()) even if the file doesn’t exist.
delete_session_from
Delete a session file at a specific path. Testable variant of delete_session.
now_iso8601
Format the current time as a simplified ISO 8601 string (e.g., "2026-02-11T12:00:00Z").
read_session
Read session data from the session file.
read_session_from
Read session data from a specific path. Testable variant of read_session.
session_file_path
Returns the path to the session file: ~/.chrome-cli/session.json.
write_session
Write session data to the session file. Creates ~/.chrome-cli/ if needed.
write_session_to
Write session data to a specific path. Testable variant of write_session.