pub struct Phone {
pub country_code: u16,
pub phone_number: String,
pub phone_type: String,
pub provider: Option<String>,
pub ported: bool,
}
Expand description
Returned when finding a phone number.
Please see api::phone for more details.
Fields
country_code: u16
phone_number: String
phone_type: String
provider: Option<String>
ported: bool
Implementations
sourceimpl Phone
impl Phone
sourcepub fn find(
c: &Client,
country_code: u16,
phone: &str
) -> Result<Phone, AuthyError>
pub fn find(
c: &Client,
country_code: u16,
phone: &str
) -> Result<Phone, AuthyError>
Request information on a phone number.
Please see api::phone::info for more details.
sourcepub fn start(
&self,
c: &Client,
via: ContactType,
code_length: Option<u8>,
locale: Option<&str>
) -> Result<PhoneStart, AuthyError>
pub fn start(
&self,
c: &Client,
via: ContactType,
code_length: Option<u8>,
locale: Option<&str>
) -> Result<PhoneStart, AuthyError>
Initiate a phone verification check.
Please see api::phone::start for more details.
sourcepub fn check(&self, c: &Client, code: &str) -> Result<(), AuthyError>
pub fn check(&self, c: &Client, code: &str) -> Result<(), AuthyError>
Verify phone verification code sent to user.
Please see api::phone::check for more details.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Phone
impl<'de> Deserialize<'de> for Phone
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Phone
impl StructuralEq for Phone
impl StructuralPartialEq for Phone
Auto Trait Implementations
impl RefUnwindSafe for Phone
impl Send for Phone
impl Sync for Phone
impl Unpin for Phone
impl UnwindSafe for Phone
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.