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 for KeychainResult<T>
impl<T: PartialEq> PartialEq for KeychainResult<T>
impl<T: Copy> Copy for KeychainResult<T>
impl<T: Eq> Eq for KeychainResult<T>
impl<T> StructuralPartialEq for KeychainResult<T>
Auto Trait Implementations§
impl<T> Freeze for KeychainResult<T>where
T: Freeze,
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