pub struct MemoryMemberships { /* private fields */ }Expand description
Memberships as a list.
Implementations§
Trait Implementations§
Source§impl Debug for MemoryMemberships
impl Debug for MemoryMemberships
Source§impl Default for MemoryMemberships
impl Default for MemoryMemberships
Source§impl MembershipStore for MemoryMemberships
impl MembershipStore for MemoryMemberships
Source§fn grant<'life0, 'async_trait>(
&'life0 self,
membership: Membership,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn grant<'life0, 'async_trait>(
&'life0 self,
membership: Membership,
) -> Pin<Box<dyn Future<Output = Result<(), StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add a membership (holding it already is not an error).
Source§fn revoke<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
principal: &'life1 Principal,
role: Option<&'life2 RoleName>,
scope: &'life3 ScopeRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<RoleName>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn revoke<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
principal: &'life1 Principal,
role: Option<&'life2 RoleName>,
scope: &'life3 ScopeRef,
) -> Pin<Box<dyn Future<Output = Result<Vec<RoleName>, StoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Remove
principal’s memberships on scope — the one role named, or
every role there. Answers the roles removed.Source§impl Memberships for MemoryMemberships
impl Memberships for MemoryMemberships
fn held(&self, who: &Principal) -> Vec<Membership>
Source§fn own_held(&self, who: &Principal) -> Vec<Membership>
fn own_held(&self, who: &Principal) -> Vec<Membership>
What
who holds of its own — without a membership the service
gives every signed-in principal (menger’s everyone grant). It
decides whether who is still waiting for an admin (auth.waiting,
auth.signup); the gate reads Memberships::held. The default is
held: a service with no such grant has nothing to leave out.Auto Trait Implementations§
impl !Freeze for MemoryMemberships
impl Forget for MemoryMemberships
impl Move for MemoryMemberships
impl RefUnwindSafe for MemoryMemberships
impl Send for MemoryMemberships
impl Sync for MemoryMemberships
impl Unpin for MemoryMemberships
impl UnsafeUnpin for MemoryMemberships
impl UnwindSafe for MemoryMemberships
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