UserInfoWriter

Trait UserInfoWriter 

Source
pub trait UserInfoWriter: Send + Sync {
    // Required methods
    fn create_user<'life0, 'async_trait>(
        &'life0 self,
        user_info: UserInfo,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn drop_user<'life0, 'async_trait>(
        &'life0 self,
        id: UserId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_user<'life0, 'async_trait>(
        &'life0 self,
        user: UserInfo,
        update_fields: Vec<UpdateField>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn grant_privilege<'life0, 'async_trait>(
        &'life0 self,
        users: Vec<UserId>,
        privileges: Vec<GrantPrivilege>,
        with_grant_option: bool,
        grantor: UserId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn revoke_privilege<'life0, 'async_trait>(
        &'life0 self,
        users: Vec<UserId>,
        privileges: Vec<GrantPrivilege>,
        granted_by: UserId,
        revoke_by: UserId,
        revoke_grant_option: bool,
        cascade: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn alter_default_privilege<'life0, 'async_trait>(
        &'life0 self,
        users: Vec<UserId>,
        database_id: DatabaseId,
        schemas: Vec<SchemaId>,
        operation: AlterDefaultPrivilegeOperation,
        granted_by: UserId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn create_user<'life0, 'async_trait>( &'life0 self, user_info: UserInfo, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn drop_user<'life0, 'async_trait>( &'life0 self, id: UserId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_user<'life0, 'async_trait>( &'life0 self, user: UserInfo, update_fields: Vec<UpdateField>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn grant_privilege<'life0, 'async_trait>( &'life0 self, users: Vec<UserId>, privileges: Vec<GrantPrivilege>, with_grant_option: bool, grantor: UserId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn revoke_privilege<'life0, 'async_trait>( &'life0 self, users: Vec<UserId>, privileges: Vec<GrantPrivilege>, granted_by: UserId, revoke_by: UserId, revoke_grant_option: bool, cascade: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn alter_default_privilege<'life0, 'async_trait>( &'life0 self, users: Vec<UserId>, database_id: DatabaseId, schemas: Vec<SchemaId>, operation: AlterDefaultPrivilegeOperation, granted_by: UserId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§