pub struct MapCtx {
pub session_id: String,
pub model: String,
pub cwd: String,
pub permission_mode: String,
pub duration_ms: u64,
/* private fields */
}Expand description
Per-process / per-turn state the mapper accumulates as events flow through
map_events. The immutable fields (session_id, model, …) describe the
run; the rest are updated in place so the final result line can report
totals (usage, cost, turn count, duration, …).
Fields§
§session_id: StringStable id for this session (echoed in every line). Usually the
--session-id value, else a freshly generated id.
model: StringModel id driving the run (e.g. claude-sonnet-4-6).
cwd: StringWorking directory, surfaced in the system.init line.
permission_mode: StringPermission mode string (e.g. bypassPermissions).
duration_ms: u64Wall-clock duration of the turn, set by the driver from
std::time::Instant right before the result line is mapped.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for MapCtx
impl Freeze for MapCtx
impl Move for MapCtx
impl RefUnwindSafe for MapCtx
impl Send for MapCtx
impl Sync for MapCtx
impl Unpin for MapCtx
impl UnsafeUnpin for MapCtx
impl UnwindSafe for MapCtx
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