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

Function optional_timestamp_field

atomic-canonical/src/delegation.rs:607–612  ·  view source on GitHub ↗
(obj: &Map<String, Value>, key: &str)

Source from the content-addressed store, hash-verified

605}
606
607fn optional_timestamp_field(obj: &Map<String, Value>, key: &str) -> Result<Option<DateTime<Utc>>> {
608 match obj.get(key) {
609 None | Some(Value::Null) => Ok(None),
610 Some(_) => timestamp_field(obj, key).map(Some),
611 }
612}
613
614#[cfg(test)]
615mod tests {

Callers 1

parseFunction · 0.85

Calls 2

timestamp_fieldFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected