Skip to main content

MemberStore

Trait MemberStore 

Source
pub trait MemberStore: Send + Sync {
Show 13 methods // Required methods fn create_member<'life0, 'async_trait>( &'life0 self, member: CreateMember, ) -> Pin<Box<dyn Future<Output = AuthResult<Member>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: '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 = AuthResult<Option<Member>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn get_member_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Member>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn delete_member<'life0, 'life1, 'async_trait>( &'life0 self, member_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Member>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn query_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 ListOrganizationMembersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn count_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn count_organization_owners<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn update_member_role_if_present<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _member_id: &'life1 str, _role: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn delete_member_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _member_id: &'life1 str, _organization_id: &'life2 str, _user_id: &'life3 str, _remove_team_members: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn list_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, _organization_id: &'life1 str, _limit: usize, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Member>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn query_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, _params: &'life1 MemberPageQuery, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

Source

fn create_member<'life0, 'async_trait>( &'life0 self, member: CreateMember, ) -> Pin<Box<dyn Future<Output = AuthResult<Member>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: '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 = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn get_member_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: '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 = AuthResult<Member>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

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

Source

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

Source

fn query_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 ListOrganizationMembersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query organization members with filter, sort, and pagination applied in the store when possible.

Source

fn count_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn count_organization_owners<'life0, 'life1, 'async_trait>( &'life0 self, org_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<i64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn update_member_role_if_present<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _member_id: &'life1 str, _role: &'life2 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update a matching member while preserving adapter model hooks. Absence is None; other storage failures remain errors.

Source

fn delete_member_with_context<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _member_id: &'life1 str, _organization_id: &'life2 str, _user_id: &'life3 str, _remove_team_members: bool, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Delete the authorized original member, then optionally release its team memberships atomically. The original scope/user remains authoritative if a lifecycle callback independently changes or removes the stored member. A missing/ignored member deletion is successful; SQL errors are failures.

Source

fn list_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, _organization_id: &'life1 str, _limit: usize, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<Member>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return the adapter’s organization-scoped page without imposing a sort. Used for the source’s paged last-owner guard independently of total count.

Source

fn query_organization_members_page<'life0, 'life1, 'async_trait>( &'life0 self, _params: &'life1 MemberPageQuery, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<Member>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply raw numeric pagination without converting it into the legacy usize API.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§