Skip to main content

UserApi

Trait UserApi 

Source
pub trait UserApi {
    // Required methods
    fn login<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        email: &'life1 str,
        password: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = ApiResult<LoginResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn login_2fa<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        otp: &'life1 str,
        session_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = ApiResult<LoginResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn get_user_me<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiResult<User>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_user_capacity<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiResult<Capacity>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_user_settings<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiResult<UserSettings>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn patch_user_settings<'life0, 'life1, 'async_trait>(
        &'life0 self,
        settings: &'life1 PatchUserSetting,
    ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_credit_log<'life0, 'life1, 'async_trait>(
        &'life0 self,
        params: &'life1 GetCreditLogService,
    ) -> Pin<Box<dyn Future<Output = ApiResult<CreditChangeLogResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sign_up<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 SignUpService,
    ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn send_reset_email<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 SendResetEmailService,
    ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn reset_password<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 ResetPasswordService,
    ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_user_storage_policies<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ApiResult<Vec<StoragePolicy>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

User and authentication API methods

Required Methods§

Source

fn login<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, email: &'life1 str, password: &'life2 str, ) -> Pin<Box<dyn Future<Output = ApiResult<LoginResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Login with email and password

Source

fn login_2fa<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, otp: &'life1 str, session_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = ApiResult<LoginResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Login with 2FA code

Source

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

Get current user information

Source

fn get_user_capacity<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ApiResult<Capacity>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get user capacity information

Source

fn get_user_settings<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ApiResult<UserSettings>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get user settings

Source

fn patch_user_settings<'life0, 'life1, 'async_trait>( &'life0 self, settings: &'life1 PatchUserSetting, ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update user settings

Source

fn get_credit_log<'life0, 'life1, 'async_trait>( &'life0 self, params: &'life1 GetCreditLogService, ) -> Pin<Box<dyn Future<Output = ApiResult<CreditChangeLogResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get credit change log

Source

fn sign_up<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SignUpService, ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sign up a new user

Source

fn send_reset_email<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 SendResetEmailService, ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send password reset email

Source

fn reset_password<'life0, 'life1, 'async_trait>( &'life0 self, request: &'life1 ResetPasswordService, ) -> Pin<Box<dyn Future<Output = ApiResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reset password with secret

Source

fn get_user_storage_policies<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ApiResult<Vec<StoragePolicy>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get user storage policies

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§