Create a new `TurnEvent` with the required fields. The timestamp is set to `Utc::now()`. Use [`with_timestamp`](Self::with_timestamp) to override.
(session_id: impl Into<String>, event_type: HookType)
| 335 | /// The timestamp is set to `Utc::now()`. Use [`with_timestamp`](Self::with_timestamp) |
| 336 | /// to override. |
| 337 | pub fn new(session_id: impl Into<String>, event_type: HookType) -> Self { |
| 338 | Self { |
| 339 | session_id: session_id.into(), |
| 340 | event_type, |
| 341 | transcript_path: None, |
| 342 | prompt: None, |
| 343 | tool_name: None, |
| 344 | tool_use_id: None, |
| 345 | timestamp: Utc::now(), |
| 346 | raw_json: None, |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | /// Set the transcript path. |
| 351 | #[must_use] |
nothing calls this directly
no outgoing calls
no test coverage detected