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

Method optional_number

atomic-core/examples/compact_semantic_codec/codec.rs:105–110  ·  view source on GitHub ↗
(&mut self, n: Option<usize>)

Source from the content-addressed store, hash-verified

103 }
104
105 fn optional_number(&mut self, n: Option<usize>) {
106 put(&mut self.c.control, u64::from(n.is_some()));
107 if let Some(n) = n {
108 delta(&mut self.c.numbers, &mut self.s.number, n as u64);
109 }
110 }
111
112 fn bytes(&mut self, bytes: &[u8], offset: Option<usize>) {
113 // Range references never stand in for a token's kind or identity.

Callers 2

encodeFunction · 0.80
decodeFunction · 0.80

Calls 4

putFunction · 0.70
deltaFunction · 0.70
undeltaFunction · 0.70
flagMethod · 0.45

Tested by

no test coverage detected