MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / from_json

Method from_json

atomic-agent/src/turn/capture.rs:195–199  ·  view source on GitHub ↗

Decode a stored capture.

(bytes: &[u8])

Source from the content-addressed store, hash-verified

193
194 /// Decode a stored capture.
195 pub fn from_json(bytes: &[u8]) -> AgentResult<Self> {
196 serde_json::from_slice(bytes).map_err(|e| crate::error::AgentError::CaptureInvalid {
197 reason: format!("JSON parse error: {}", e),
198 })
199 }
200}
201
202/// Decode the hex MAC key into exactly 32 bytes.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected