pub struct MockPhoneNumberValidator { /* private fields */ }Expand description
Mock phone number validator for testing.
In production, this would integrate with Twilio or similar service.
Implementations§
Trait Implementations§
Source§impl AsyncValidator for MockPhoneNumberValidator
impl AsyncValidator for MockPhoneNumberValidator
Source§fn validate_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
value: &'life1 str,
field: &'life2 str,
) -> Pin<Box<dyn Future<Output = AsyncValidatorResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate_async<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
value: &'life1 str,
field: &'life2 str,
) -> Pin<Box<dyn Future<Output = AsyncValidatorResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Validate a value asynchronously. Read more
Source§fn provider(&self) -> AsyncValidatorProvider
fn provider(&self) -> AsyncValidatorProvider
Get the provider this validator uses
Auto Trait Implementations§
impl Freeze for MockPhoneNumberValidator
impl RefUnwindSafe for MockPhoneNumberValidator
impl Send for MockPhoneNumberValidator
impl Sync for MockPhoneNumberValidator
impl Unpin for MockPhoneNumberValidator
impl UnsafeUnpin for MockPhoneNumberValidator
impl UnwindSafe for MockPhoneNumberValidator
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