pub struct PhoneNumberOptions {
pub otp_length: usize,
pub expires_in: Duration,
pub allowed_attempts: u32,
pub require_verification: bool,
pub send_otp: Option<PhoneNumberSender>,
pub verify_otp: Option<PhoneNumberVerifier>,
pub send_password_reset_otp: Option<PhoneNumberSender>,
pub callback_on_verification: Option<PhoneNumberCallback>,
pub phone_number_validator: Option<PhoneNumberValidator>,
pub sign_up_on_verification: Option<SignUpOnVerification>,
pub schema: PhoneNumberSchemaOptions,
}Fields§
§otp_length: usize§expires_in: Duration§allowed_attempts: u32§require_verification: bool§send_otp: Option<PhoneNumberSender>Sync-only OTP sender callback.
verify_otp: Option<PhoneNumberVerifier>Sync-only custom OTP verifier callback.
send_password_reset_otp: Option<PhoneNumberSender>Sync-only password-reset OTP sender callback.
callback_on_verification: Option<PhoneNumberCallback>Sync-only callback invoked after successful phone verification.
phone_number_validator: Option<PhoneNumberValidator>Sync-only phone-number validator callback.
sign_up_on_verification: Option<SignUpOnVerification>§schema: PhoneNumberSchemaOptionsImplementations§
Source§impl PhoneNumberOptions
impl PhoneNumberOptions
pub fn new<F>(sender: F) -> Self
pub fn expires_in(self, expires_in: Duration) -> Self
pub fn send_otp<F>(self, sender: F) -> Self
pub fn verify_otp<F>(self, verifier: F) -> Self
pub fn send_password_reset_otp<F>(self, sender: F) -> Self
pub fn phone_number_validator<F>(self, validator: F) -> Self
pub fn callback_on_verification<F>(self, callback: F) -> Self
pub fn sign_up_on_verification(self, options: SignUpOnVerification) -> Self
pub fn require_verification(self, require_verification: bool) -> Self
pub fn validate(&self) -> Result<(), RustAuthError>
Trait Implementations§
Source§impl Clone for PhoneNumberOptions
impl Clone for PhoneNumberOptions
Source§fn clone(&self) -> PhoneNumberOptions
fn clone(&self) -> PhoneNumberOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for PhoneNumberOptions
impl !UnwindSafe for PhoneNumberOptions
impl Freeze for PhoneNumberOptions
impl Send for PhoneNumberOptions
impl Sync for PhoneNumberOptions
impl Unpin for PhoneNumberOptions
impl UnsafeUnpin for PhoneNumberOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more