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§
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".