Skip to main content

EmailOtpGenerator

Trait EmailOtpGenerator 

Source
pub trait EmailOtpGenerator:
    Send
    + Sync
    + 'static {
    // Required method
    fn generate_otp(
        &self,
        email: &str,
        otp_type: EmailOtpType,
        length: usize,
    ) -> String;
}

Required Methods§

Source

fn generate_otp( &self, email: &str, otp_type: EmailOtpType, length: usize, ) -> String

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F> EmailOtpGenerator for F
where F: Fn(&str, EmailOtpType, usize) -> String + Send + Sync + 'static,