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

Method stream_cid

event/src/unvalidated/event.rs:256–265  ·  view source on GitHub ↗

Get the CID of the init event of the stream for this event

(&self)

Source from the content-addressed store, hash-verified

254
255 /// Get the CID of the init event of the stream for this event
256 pub fn stream_cid(&self) -> &Cid {
257 match self {
258 Event::Time(event) => event.id(),
259 Event::Signed(event) => match event.payload() {
260 Payload::Data(d) => d.id(),
261 Payload::Init(_) => event.envelope_cid(),
262 },
263 Event::Unsigned(event) => event.cid(),
264 }
265 }
266
267 /// Returns true if this Event is a time event, and false otherwise
268 pub fn is_time_event(&self) -> bool {

Callers 1

try_fromMethod · 0.45

Calls 4

envelope_cidMethod · 0.80
idMethod · 0.45
payloadMethod · 0.45
cidMethod · 0.45

Tested by

no test coverage detected