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

Method flag

atomic-core/examples/compact_semantic_codec/codec.rs:292–296  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

290
291impl Decoder<'_> {
292 fn flag(&mut self) -> Result<bool> {
293 let flag = get(&mut self.control)?;
294 ensure!(flag <= 1, "invalid optional flag");
295 Ok(flag == 1)
296 }
297
298 fn count(&mut self) -> Result<usize> {
299 let n = usize::try_from(get(&mut self.control)?)?;

Callers 4

optional_branchMethod · 0.45
optional_numberMethod · 0.45
leavesMethod · 0.45
decodeFunction · 0.45

Calls 1

getFunction · 0.70

Tested by

no test coverage detected