pub struct GroupStore { /* private fields */ }Implementations§
Source§impl GroupStore
impl GroupStore
pub fn open(root: impl Into<PathBuf>) -> Self
pub fn for_data_dir(data_dir: impl AsRef<Path>) -> Self
Sourcepub fn init(&self) -> Result<(), GroupStoreError>
pub fn init(&self) -> Result<(), GroupStoreError>
Load all persisted records into the in-memory cache. Call once at startup.
pub fn create_group( &self, record: GroupCreationRecord, ) -> Result<(), GroupStoreError>
pub fn add_private_group_member( &self, record: PrivateGroupMemberAddRecord, ) -> Result<(), GroupStoreError>
pub fn remove_private_group_member( &self, record: PrivateGroupMemberRemoveRecord, ) -> Result<(), GroupStoreError>
pub fn invite_to_public_group( &self, record: PublicGroupInviteRecord, ) -> Result<(), GroupStoreError>
pub fn accept_group_invitation( &self, record: PublicGroupAcceptRecord, ) -> Result<(), GroupStoreError>
pub fn leave_group( &self, record: PublicGroupLeaveRecord, ) -> Result<(), GroupStoreError>
Sourcepub fn pilot_has_private_group_access(
&self,
requester: &PilotId,
owner: &PilotId,
) -> bool
pub fn pilot_has_private_group_access( &self, requester: &PilotId, owner: &PilotId, ) -> bool
True when requester is a member of any private group owned by owner.
True when both pilots are confirmed members of at least one common public group.
Sourcepub fn list_pilot_groups(&self, pilot_id: &PilotId) -> Vec<GroupMembership>
pub fn list_pilot_groups(&self, pilot_id: &PilotId) -> Vec<GroupMembership>
List all groups a pilot is associated with (owned, member-of, or public member).
Sourcepub fn list_group_members(&self, group_id: &GroupId) -> Vec<PilotId>
pub fn list_group_members(&self, group_id: &GroupId) -> Vec<PilotId>
List all confirmed members of a public group.
Sourcepub fn list_private_group_members(&self, group_id: &GroupId) -> Vec<PilotId>
pub fn list_private_group_members(&self, group_id: &GroupId) -> Vec<PilotId>
List all private-group members added by owner.
Sourcepub fn list_pending_invitations(&self, pilot_id: &PilotId) -> Vec<GroupId>
pub fn list_pending_invitations(&self, pilot_id: &PilotId) -> Vec<GroupId>
List public groups with a pending invitation for pilot_id.
pub fn group_meta(&self, group_id: &GroupId) -> Option<GroupCreationRecord>
Sourcepub fn lookup_by_name(&self, name: &str) -> Option<GroupCreationRecord>
pub fn lookup_by_name(&self, name: &str) -> Option<GroupCreationRecord>
Find a group by its exact name (case-sensitive). Returns None if no group matches.
Auto Trait Implementations§
impl !Freeze for GroupStore
impl RefUnwindSafe for GroupStore
impl Send for GroupStore
impl Sync for GroupStore
impl Unpin for GroupStore
impl UnsafeUnpin for GroupStore
impl UnwindSafe for GroupStore
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