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

Method finish

atomic-core/examples/graph_codec_lab/codec.rs:231–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

229 value.serialize(&mut *self.w)
230 }
231 fn finish(self) -> SResult<()> {
232 if let Some((len, bytes)) = self.pending {
233 if len != bytes.len() {
234 return Err(Error("sequence length mismatch".into()));
235 }
236 self.w.byte_sequence(&bytes)?;
237 }
238 self.w.ctx = self.parent;
239 Ok(())
240 }
241}
242macro_rules! sequence {
243 ($trait:ident,$method:ident) => {

Callers 1

endMethod · 0.45

Calls 3

ErrorClass · 0.85
byte_sequenceMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected