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

Method serialize_struct_variant

atomic-core/examples/graph_codec_lab/codec.rs:458–466  ·  view source on GitHub ↗
(
        self,
        name: &'static str,
        index: u32,
        variant: &'static str,
        len: usize,
    )

Source from the content-addressed store, hash-verified

456 self.serialize_tuple(len)
457 }
458 fn serialize_struct_variant(
459 self,
460 name: &'static str,
461 index: u32,
462 variant: &'static str,
463 len: usize,
464 ) -> SResult<Compound<'a>> {
465 self.serialize_tuple_variant(name, index, variant, len)
466 }
467}
468
469pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>> {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected