pub enum PhoneAuthenticationResponse {
Authorized,
Unauthorized,
Opaque(OpaquePhoneAuthenticationResponse),
}Expand description
Plain-text decision returned by a phone authentication endpoint.
Variants§
Authorized
Opaque(OpaquePhoneAuthenticationResponse)
A bounded response token not recognized by this version of the crate.
Implementations§
Source§impl PhoneAuthenticationResponse
impl PhoneAuthenticationResponse
Sourcepub fn from_bytes(value: &[u8]) -> Result<Self, PhoneAuthenticationError>
pub fn from_bytes(value: &[u8]) -> Result<Self, PhoneAuthenticationError>
Parses a bounded decision token, preserving unrecognized bytes exactly.
Sourcepub fn as_bytes(&self) -> &[u8] ⓘ
pub fn as_bytes(&self) -> &[u8] ⓘ
Borrows the canonical decision token or the preserved opaque response.
pub fn to_bytes(&self) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for PhoneAuthenticationResponse
impl Clone for PhoneAuthenticationResponse
Source§fn clone(&self) -> PhoneAuthenticationResponse
fn clone(&self) -> PhoneAuthenticationResponse
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 moreSource§impl Debug for PhoneAuthenticationResponse
impl Debug for PhoneAuthenticationResponse
impl Eq for PhoneAuthenticationResponse
impl StructuralPartialEq for PhoneAuthenticationResponse
Auto Trait Implementations§
impl Freeze for PhoneAuthenticationResponse
impl RefUnwindSafe for PhoneAuthenticationResponse
impl Send for PhoneAuthenticationResponse
impl Sync for PhoneAuthenticationResponse
impl Unpin for PhoneAuthenticationResponse
impl UnsafeUnpin for PhoneAuthenticationResponse
impl UnwindSafe for PhoneAuthenticationResponse
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