Fast and robust atproto CAR file processing in rust
14
fork

Configure Feed

Select the types of activity you want to include in your feed.

Copy for ObjectLink and as_cid() shortcut

phil 03678b2f 5ac78f77

+4 -1
+4 -1
src/mst.rs
··· 9 9 use sha2::{Digest, Sha256}; 10 10 use std::fmt; 11 11 12 - #[derive(Debug, serde::Deserialize, Clone, PartialEq, Eq, Hash)] 12 + #[derive(Debug, serde::Deserialize, Clone, Copy, PartialEq, Eq, Hash)] 13 13 pub struct ObjectLink(Cid); 14 14 15 15 impl ObjectLink { 16 16 pub fn to_bytes(&self) -> Vec<u8> { 17 17 self.0.to_bytes() 18 + } 19 + pub fn as_cid(&self) -> Cid { 20 + self.0 18 21 } 19 22 } 20 23