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

Method field

atomic-agent/src/hook_log.rs:56–60  ·  view source on GitHub ↗
(value: Option<&serde_json::Value>, names: &[&str])

Source from the content-addressed store, hash-verified

54
55 fn from_json(value: Option<&serde_json::Value>) -> Self {
56 fn field(value: Option<&serde_json::Value>, names: &[&str]) -> Option<String> {
57 names
58 .iter()
59 .find_map(|name| usable(value?.get(name)?.as_str()))
60 }
61 let nested = value.and_then(|value| value.get("raw_json"));
62 Self {
63 session_id: field(

Callers 15

fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80
fmtMethod · 0.80

Calls 4

usableFunction · 0.85
getMethod · 0.65
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected