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

Method flag

atomic-core/src/change/format_v3/graph_fields/decode.rs:152–158  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

150 })
151 }
152 fn flag(&mut self) -> FormatResult<bool> {
153 match get(&mut self.control)? {
154 0 => Ok(false),
155 1 => Ok(true),
156 _ => Err(invalid("invalid presence flag")),
157 }
158 }
159 fn count(&mut self, cost: usize, available: usize) -> FormatResult<usize> {
160 let n = usize::try_from(get(&mut self.control)?).map_err(|_| invalid("count overflow"))?;
161 if n > available {

Callers 2

optional_insertionMethod · 0.45
optional_edgesMethod · 0.45

Calls 2

getFunction · 0.70
invalidFunction · 0.70

Tested by

no test coverage detected