Trait SocialGraphBackend
Source pub trait SocialGraphBackend: Send + Sync {
Show 14 methods
// Required methods
fn stats(&self) -> Result<SocialGraphStats>;
fn users_by_follow_distance(&self, distance: u32) -> Result<Vec<[u8; 32]>>;
fn follow_distance(&self, pk_bytes: &[u8; 32]) -> Result<Option<u32>>;
fn follow_list_created_at(&self, owner: &[u8; 32]) -> Result<Option<u64>>;
fn followed_targets(&self, owner: &[u8; 32]) -> Result<UserSet>;
fn is_overmuted_user(
&self,
user_pk: &[u8; 32],
threshold: f64,
) -> Result<bool>;
fn snapshot_chunks(
&self,
root: &[u8; 32],
options: &BinaryBudget,
) -> Result<Vec<Bytes>>;
fn ingest_event(&self, event: &Event) -> Result<()>;
fn query_events(&self, filter: &Filter, limit: usize) -> Result<Vec<Event>>;
// Provided methods
fn profile_search_root(&self) -> Result<Option<Cid>> { ... }
fn ingest_event_with_storage_class(
&self,
event: &Event,
storage_class: EventStorageClass,
) -> Result<()> { ... }
fn ingest_events(&self, events: &[Event]) -> Result<()> { ... }
fn ingest_events_with_storage_class(
&self,
events: &[Event],
storage_class: EventStorageClass,
) -> Result<()> { ... }
fn ingest_graph_events(&self, events: &[Event]) -> Result<()> { ... }
}