pub enum Error {
Show 22 variants
Hidden,
Argon2Hash(Error),
Argon2(Error),
AesGcm(Error),
Io(Error),
Secp256k1(Error),
TryFromSlice(TryFromSliceError),
FromUtf8(FromUtf8Error),
Poison,
NotInCache,
Rsa(Error),
Pkcs8(Error),
SerdeJson(Error),
Base64Decode(DecodeError),
Split,
WrongAlgorithm(String),
WrongIssuer(String),
Expired(u128),
WrongKeySize(usize),
Custom(String),
Duplicate,
NotFound,
}Variants§
Hidden
Argon2Hash(Error)
Argon2(Error)
AesGcm(Error)
Io(Error)
Secp256k1(Error)
TryFromSlice(TryFromSliceError)
FromUtf8(FromUtf8Error)
Poison
NotInCache
Rsa(Error)
Pkcs8(Error)
SerdeJson(Error)
Base64Decode(DecodeError)
Split
WrongAlgorithm(String)
WrongIssuer(String)
Expired(u128)
WrongKeySize(usize)
Custom(String)
Duplicate
NotFound
Implementations§
Source§impl Error
impl Error
Sourcepub fn map<T, E: Into<Self>>(result: Result<T, E>) -> Result<T>
pub fn map<T, E: Into<Self>>(result: Result<T, E>) -> Result<T>
Maps a result to a result with an Error.
§Examples
use ovunto_security::primitives::Error;
let result: Result<(), String> = Err("An error occurred".to_string());
assert!(Error::map(result).is_err());pub fn mapper<E: Into<Self>>(err: E) -> Self
pub fn from_string<S: ToString>(err: S) -> Self
pub fn to_string<E: Into<Self>>(error: E) -> String
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for Error
impl<T> From<PoisonError<T>> for Error
Source§fn from(_: PoisonError<T>) -> Self
fn from(_: PoisonError<T>) -> Self
Converts to this type from the input type.
Source§impl From<TryFromSliceError> for Error
impl From<TryFromSliceError> for Error
Source§fn from(err: TryFromSliceError) -> Self
fn from(err: TryFromSliceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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