pub struct SocialGraphStore { /* private fields */ }Implementations§
Source§impl SocialGraphStore
impl SocialGraphStore
pub fn profile_search_root(&self) -> Result<Option<Cid>>
pub fn latest_profile_event(&self, pubkey_hex: &str) -> Result<Option<Event>>
pub fn profile_search_entries_for_prefix( &self, prefix: &str, ) -> Result<Vec<(String, StoredProfileSearchEntry)>>
pub fn sync_profile_index_for_events(&self, events: &[Event]) -> Result<()>
pub fn rebuild_profile_index_from_stored_events(&self) -> Result<usize>
Trait Implementations§
Source§impl SocialGraphBackend for SocialGraphStore
impl SocialGraphBackend for SocialGraphStore
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 profile_search_root(&self) -> Result<Option<Cid>>
fn snapshot_chunks( &self, root: &[u8; 32], options: &BinaryBudget, ) -> Result<Vec<Bytes>>
fn ingest_event(&self, event: &Event) -> Result<()>
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<()>
fn query_events(&self, filter: &Filter, limit: usize) -> Result<Vec<Event>>
Source§impl SocialGraphBackend for SocialGraphStore
impl SocialGraphBackend for SocialGraphStore
type Error = UpstreamGraphBackendError
fn get_root(&self) -> Result<String, Self::Error>
fn set_root(&mut self, root: &str) -> Result<(), Self::Error>
fn handle_event( &mut self, event: &GraphEvent, allow_unknown_authors: bool, overmute_threshold: f64, ) -> Result<(), Self::Error>
fn get_follow_distance(&self, user: &str) -> Result<u32, Self::Error>
fn is_following( &self, follower: &str, followed_user: &str, ) -> Result<bool, Self::Error>
fn get_followed_by_user(&self, user: &str) -> Result<Vec<String>, Self::Error>
fn get_followers_by_user(&self, user: &str) -> Result<Vec<String>, Self::Error>
fn get_muted_by_user(&self, user: &str) -> Result<Vec<String>, Self::Error>
fn get_user_muted_by(&self, user: &str) -> Result<Vec<String>, Self::Error>
fn get_follow_list_created_at( &self, user: &str, ) -> Result<Option<u64>, Self::Error>
fn get_mute_list_created_at( &self, user: &str, ) -> Result<Option<u64>, Self::Error>
fn is_overmuted(&self, user: &str, threshold: f64) -> Result<bool, Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
fn has_unflushed_changes(&self) -> bool
Auto Trait Implementations§
impl !Freeze for SocialGraphStore
impl RefUnwindSafe for SocialGraphStore
impl Send for SocialGraphStore
impl Sync for SocialGraphStore
impl Unpin for SocialGraphStore
impl UnsafeUnpin for SocialGraphStore
impl UnwindSafe for SocialGraphStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more