Enum distant_net::common::authentication::KeychainResult
source · pub enum KeychainResult<T> {
InvalidId,
InvalidPassword,
Ok(T),
}Expand description
Represents the result of a request to the database.
Variants
InvalidId
Id was not found in the database.
InvalidPassword
Password match for an id failed.
Ok(T)
Successful match of id and password, removing from keychain and returning data T.
Implementations
sourceimpl<T> KeychainResult<T>
impl<T> KeychainResult<T>
pub fn is_invalid_id(&self) -> bool
pub fn is_invalid_password(&self) -> bool
pub fn is_invalid(&self) -> bool
pub fn is_ok(&self) -> bool
pub fn into_ok(self) -> Option<T>
Trait Implementations
sourceimpl<T: Clone> Clone for KeychainResult<T>
impl<T: Clone> Clone for KeychainResult<T>
sourcefn clone(&self) -> KeychainResult<T>
fn clone(&self) -> KeychainResult<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl<T: Debug> Debug for KeychainResult<T>
impl<T: Debug> Debug for KeychainResult<T>
sourceimpl<T> From<KeychainResult<T>> for Option<T>
impl<T> From<KeychainResult<T>> for Option<T>
sourcefn from(result: KeychainResult<T>) -> Self
fn from(result: KeychainResult<T>) -> Self
Converts to this type from the input type.
sourceimpl<T: PartialEq> PartialEq<KeychainResult<T>> for KeychainResult<T>
impl<T: PartialEq> PartialEq<KeychainResult<T>> for KeychainResult<T>
sourcefn eq(&self, other: &KeychainResult<T>) -> bool
fn eq(&self, other: &KeychainResult<T>) -> bool
impl<T: Copy> Copy for KeychainResult<T>
impl<T: Eq> Eq for KeychainResult<T>
impl<T> StructuralEq for KeychainResult<T>
impl<T> StructuralPartialEq for KeychainResult<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for KeychainResult<T>where
T: RefUnwindSafe,
impl<T> Send for KeychainResult<T>where
T: Send,
impl<T> Sync for KeychainResult<T>where
T: Sync,
impl<T> Unpin for KeychainResult<T>where
T: Unpin,
impl<T> UnwindSafe for KeychainResult<T>where
T: UnwindSafe,
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