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

Method flag

atomic-core/src/change/format_v3/semantic/decode.rs:51–60  ·  view source on GitHub ↗
(&mut self, role: usize)

Source from the content-addressed store, hash-verified

49 Ok(n)
50 }
51 fn flag(&mut self, role: usize) -> FormatResult<bool> {
52 if self.predictive.is_none() {
53 return flag(&mut self.c.control);
54 }
55 match self.value(role)? {
56 0 => Ok(false),
57 1 => Ok(true),
58 _ => Err(invalid("invalid predictive presence flag")),
59 }
60 }
61 fn id(&mut self, branch: bool) -> FormatResult<(NodeId, u32)> {
62 let (input, o, i) = if branch && self.c.split_ids {
63 (

Callers 3

optional_branchMethod · 0.45
leavesMethod · 0.45
lineMethod · 0.45

Calls 4

is_noneMethod · 0.80
flagFunction · 0.70
invalidFunction · 0.70
valueMethod · 0.45

Tested by

no test coverage detected