Skip to main content

UserBehavior

Trait UserBehavior 

Source
pub trait UserBehavior {
    // Required methods
    fn get_current_user_session(
        &self,
    ) -> impl Future<Output = Result<SessionDTO, Error>> + Send;
    fn post_registration(
        &self,
        username: &str,
        email: &str,
        captcha: &str,
    ) -> impl Future<Output = Result<RegistrationDTO, Error>> + Send;
    fn verify_email(
        &self,
        id: &str,
        code: &str,
        password: &str,
    ) -> impl Future<Output = Result<VerifyEmailDTO, Error>> + Send;
    fn get_exam_status(
        &self,
    ) -> impl Future<Output = Result<ExamStatusDTO, Error>> + Send;
    fn start_exam(
        &self,
    ) -> impl Future<Output = Result<StartExamDTO, Error>> + Send;
    fn get_current_question(
        &self,
        id: &str,
    ) -> impl Future<Output = Result<CurrentQuestionDTO, Error>> + Send;
    fn submit_answer(
        &self,
        exam_id: &str,
        question_id: &str,
        token: &str,
        selected_option_ids: Vec<String>,
    ) -> impl Future<Output = Result<SubmitExamAnswerResponseDTO, Error>> + Send;
}

Required Methods§

Source

fn get_current_user_session( &self, ) -> impl Future<Output = Result<SessionDTO, Error>> + Send

Source

fn post_registration( &self, username: &str, email: &str, captcha: &str, ) -> impl Future<Output = Result<RegistrationDTO, Error>> + Send

Source

fn verify_email( &self, id: &str, code: &str, password: &str, ) -> impl Future<Output = Result<VerifyEmailDTO, Error>> + Send

Source

fn get_exam_status( &self, ) -> impl Future<Output = Result<ExamStatusDTO, Error>> + Send

Source

fn start_exam(&self) -> impl Future<Output = Result<StartExamDTO, Error>> + Send

Source

fn get_current_question( &self, id: &str, ) -> impl Future<Output = Result<CurrentQuestionDTO, Error>> + Send

Source

fn submit_answer( &self, exam_id: &str, question_id: &str, token: &str, selected_option_ids: Vec<String>, ) -> impl Future<Output = Result<SubmitExamAnswerResponseDTO, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§