pub struct FollowStore { /* private fields */ }Implementations§
Source§impl FollowStore
impl FollowStore
pub fn open(root: impl Into<PathBuf>) -> Self
pub fn for_data_dir(data_dir: impl AsRef<Path>) -> Self
Sourcepub fn init(&self) -> Result<(), FollowStoreError>
pub fn init(&self) -> Result<(), FollowStoreError>
Load all persisted records into the in-memory cache. Call once at startup.
pub fn follow_pilot(&self, record: FollowRecord) -> Result<(), FollowStoreError>
pub fn unfollow_pilot( &self, record: UnfollowRecord, ) -> Result<(), FollowStoreError>
pub fn list_following(&self, pilot_id: &PilotId) -> Vec<PilotId>
pub fn list_followers(&self, pilot_id: &PilotId) -> Vec<PilotId>
pub fn is_following(&self, follower: &PilotId, followee: &PilotId) -> bool
Auto Trait Implementations§
impl !Freeze for FollowStore
impl RefUnwindSafe for FollowStore
impl Send for FollowStore
impl Sync for FollowStore
impl Unpin for FollowStore
impl UnsafeUnpin for FollowStore
impl UnwindSafe for FollowStore
Blanket Implementations§
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