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

Method encode_capability

event/src/unvalidated/signed/mod.rs:130–135  ·  view source on GitHub ↗

Encodes the capability as IPLD if present

(&self)

Source from the content-addressed store, hash-verified

128 }
129 /// Encodes the capability as IPLD if present
130 pub fn encode_capability(&self) -> anyhow::Result<Option<(Cid, Vec<u8>)>> {
131 self.capability
132 .as_ref()
133 .map(|(cid, cacao)| Ok((*cid, cacao.to_cbor()?)))
134 .transpose()
135 }
136
137 /// Get the CID of the signature envelope
138 pub fn envelope_cid(&self) -> &Cid {

Callers 1

encode_carMethod · 0.80

Calls 3

mapMethod · 0.80
to_cborMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected