Skip to main content

UserStore

Trait UserStore 

Source
pub trait UserStore<S: AuthSchema>: Send + Sync {
Show 25 methods // Required methods fn create_user<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_user_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_users_by_ids<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_user_by_email<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_user_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn delete_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn list_users<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<S::User>, usize)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn provider_verification_output<'life0, 'life1, 'async_trait>( &'life0 self, _id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<Value>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn create_user_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_with_source_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_prepared_record<'life0, 'async_trait>( &'life0 self, prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_user_by_id_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_user_by_email_record<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_user_by_username_record<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_user_by_phone_number_record<'life0, 'life1, 'async_trait>( &'life0 self, phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_users_by_ids_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_users_by_ids_page_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], limit: f64, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn update_user_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn list_users_record<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<AdapterRecord<S::User>>, usize)>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_with_source<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, _source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_user_prepared<'life0, 'async_trait>( &'life0 self, _prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn coerce_user_text_number<'life0, 'async_trait>( &'life0 self, _input: NumericTextInput, ) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn list_users_by_ids_page<'life0, 'life1, 'async_trait>( &'life0 self, _ids: &'life1 [String], _limit: f64, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_user_by_phone_number<'life0, 'life1, 'async_trait>( &'life0 self, _phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}

Required Methods§

Source

fn create_user<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_user_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn list_users_by_ids<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch multiple users by id.

Implementations may return rows in any order. Callers must remap by id when response order matters.

Source

fn get_user_by_email<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_user_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn update_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete_user<'life0, 'life1, 'async_trait>( &'life0 self, 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_users<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<S::User>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

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

Read the provider verification column using the adapter’s physical scalar rules. This is retained output, not authorization input; typed models continue to supply the canonical boolean accessor.

Source

fn create_user_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn create_user_with_source_record<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn create_user_prepared_record<'life0, 'async_trait>( &'life0 self, prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn get_user_by_id_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn get_user_by_email_record<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn get_user_by_username_record<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn get_user_by_phone_number_record<'life0, 'life1, 'async_trait>( &'life0 self, phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn list_users_by_ids_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn list_users_by_ids_page_record<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [String], limit: f64, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<AdapterRecord<S::User>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn update_user_record<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = AuthResult<AdapterRecord<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn list_users_record<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = AuthResult<(Vec<AdapterRecord<S::User>>, usize)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return a retained adapter record. The default is the physical model’s serialized snapshot; initialized stores apply their declared output policy.

Source

fn create_user_with_source<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, _source: UserValidationSource, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create with endpoint-owned identity provenance, retaining the finalized instance’s validation and database-hook ordering.

Source

fn create_user_prepared<'life0, 'async_trait>( &'life0 self, _prepared: PreparedUserCreation, ) -> Pin<Box<dyn Future<Output = AuthResult<S::User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Persist a normalized, admitted candidate without normalizing trusted callback mutations again. Unsupported custom adapters fail closed.

Source

fn coerce_user_text_number<'life0, 'async_trait>( &'life0 self, _input: NumericTextInput, ) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Coerce a numeric binding with the configured adapter’s text semantics. Custom adapters must implement this explicitly when accepting such input.

Source

fn list_users_by_ids_page<'life0, 'life1, 'async_trait>( &'life0 self, _ids: &'life1 [String], _limit: f64, ) -> Pin<Box<dyn Future<Output = AuthResult<Vec<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Apply the adapter’s raw numeric page to actual matching users. Unsupported stores fail closed rather than rounding, capping, or delegating to an unpaged read.

Source

fn get_user_by_phone_number<'life0, 'life1, 'async_trait>( &'life0 self, _phone_number: &'life1 str, ) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§