Enum distant_net::common::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§
source§impl<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§
source§impl<T: Clone> Clone for KeychainResult<T>
impl<T: Clone> Clone for KeychainResult<T>
source§fn clone(&self) -> KeychainResult<T>
fn clone(&self) -> KeychainResult<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<T: Debug> Debug for KeychainResult<T>
impl<T: Debug> Debug for KeychainResult<T>
source§impl<T> From<KeychainResult<T>> for Option<T>
impl<T> From<KeychainResult<T>> for Option<T>
source§fn from(result: KeychainResult<T>) -> Self
fn from(result: KeychainResult<T>) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq<KeychainResult<T>> for KeychainResult<T>
impl<T: PartialEq> PartialEq<KeychainResult<T>> for KeychainResult<T>
source§fn eq(&self, other: &KeychainResult<T>) -> bool
fn eq(&self, other: &KeychainResult<T>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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§
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