MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / encode

Method encode

car/src/header.rs:35–42  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

33 }
34
35 pub fn encode(&self) -> Result<Vec<u8>, Error> {
36 match self {
37 CarHeader::V1(ref header) => {
38 let res = serde_ipld_dagcbor::to_vec(header)?;
39 Ok(res)
40 }
41 }
42 }
43
44 pub fn roots(&self) -> &[Cid] {
45 match self {

Callers 15

fromMethod · 0.45
writeMethod · 0.45
writeMethod · 0.45
jws_digestFunction · 0.45
encodeRawEventFunction · 0.45
flight-sql.test.tsFile · 0.45
expectEventFunction · 0.45
writeNewEventFunction · 0.45
codecs.test.tsFile · 0.45
constructorMethod · 0.45
bytesMethod · 0.45
toStringMethod · 0.45

Calls

no outgoing calls

Tested by 4

expectEventFunction · 0.36
writeNewEventFunction · 0.36
encodeMultibaseFunction · 0.36
encodeStreamIDFunction · 0.36