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

Function optional_timestamp_field

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

Source from the content-addressed store, hash-verified

640}
641
642fn optional_timestamp_field(obj: &Map<String, Value>, key: &str) -> Result<Option<DateTime<Utc>>> {
643 match obj.get(key) {
644 None | Some(Value::Null) => Ok(None),
645 Some(_) => timestamp_field(obj, key).map(Some),
646 }
647}
648
649#[cfg(test)]
650mod tests {

Callers 1

parseFunction · 0.85

Calls 2

timestamp_fieldFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected