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

Method parse_value

atomic-agent/src/hooks/codex.rs:180–190  ·  view source on GitHub ↗
(
        &self,
        hook_type: HookType,
        raw_json: Value,
    )

Source from the content-addressed store, hash-verified

178 }
179
180 fn parse_value<T: for<'de> Deserialize<'de>>(
181 &self,
182 hook_type: HookType,
183 raw_json: Value,
184 ) -> AgentResult<T> {
185 serde_json::from_value(raw_json).map_err(|e| AgentError::HookParseFailed {
186 agent: self.name().to_string(),
187 hook_type: hook_type.as_str().to_string(),
188 reason: e.to_string(),
189 })
190 }
191}
192
193impl Default for CodexHook {

Callers 1

parse_eventMethod · 0.80

Calls 2

nameMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected