Best-effort extraction keeps invalid JSON attributable when the caller supplies correlation via the environment; otherwise it stays unassigned.
(input: &[u8])
| 27 | /// Best-effort extraction keeps invalid JSON attributable when the caller |
| 28 | /// supplies correlation via the environment; otherwise it stays unassigned. |
| 29 | pub fn from_input(input: &[u8]) -> Self { |
| 30 | let value = serde_json::from_slice::<serde_json::Value>(input).ok(); |
| 31 | Self::from_json(value.as_ref()).with_environment() |
| 32 | } |
| 33 | |
| 34 | pub fn from_event(event: &crate::event::TurnEvent) -> Self { |
| 35 | Self::from_event_payload(event).with_environment() |
nothing calls this directly
no test coverage detected