Skip to main content

MemberOps

Trait MemberOps 

Source
pub trait MemberOps:
    Send
    + Sync
    + 'static {
    type Member: AuthMember;

    // Required methods
    fn create_member<'life0, 'async_trait>(
        &'life0 self,
        member: CreateMember,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Member, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn get_member<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        organization_id: &'life1 str,
        user_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Member>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn get_member_by_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Member>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn update_member_role<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        member_id: &'life1 str,
        role: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Member, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
    fn delete_member<'life0, 'life1, 'async_trait>(
        &'life0 self,
        member_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn list_organization_members<'life0, 'life1, 'async_trait>(
        &'life0 self,
        organization_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Member>, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn count_organization_members<'life0, 'life1, 'async_trait>(
        &'life0 self,
        organization_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn count_organization_owners<'life0, 'life1, 'async_trait>(
        &'life0 self,
        organization_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Organization member persistence operations.

Required Associated Types§

Required Methods§

Source

fn create_member<'life0, 'async_trait>( &'life0 self, member: CreateMember, ) -> Pin<Box<dyn Future<Output = Result<Self::Member, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn get_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Member>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Source

fn get_member_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Member>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_member_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, member_id: &'life1 str, role: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Self::Member, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Source

fn delete_member<'life0, 'life1, 'async_trait>( &'life0 self, member_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn list_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Member>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn count_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn count_organization_owners<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Implementors§