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

Method value

atomic-audit/src/extract/mod.rs:112–124  ·  view source on GitHub ↗
(&self, key: &(Metric, String), known_other: bool)

Source from the content-addressed store, hash-verified

110 }
111
112 fn value(&self, key: &(Metric, String), known_other: bool) -> Measurement {
113 if let Some(entry) = self.entries.get(key) {
114 return entry.value.clone();
115 }
116 match &self.state {
117 State::Absent => not_applicable("File is absent in this revision"),
118 State::Unavailable(reason) => unavailable(reason),
119 State::Ready if known_other => {
120 not_applicable("Subject is not present in this revision")
121 }
122 State::Ready => not_applicable("No applicable declarations in this file"),
123 }
124 }
125}
126
127fn measured(value: u32) -> Measurement {

Callers 1

extract_changesFunction · 0.45

Calls 4

not_applicableFunction · 0.85
unavailableFunction · 0.70
getMethod · 0.65
cloneMethod · 0.45

Tested by

no test coverage detected