pub enum Error {
Show 17 variants
Http(Error),
Serialization(Error),
Cbor(String),
Crypto(String),
AttestationVerificationFailed(String),
Session(String),
KeyExchange(String),
Encryption(String),
Decryption(String),
Authentication(String),
InvalidResponse(String),
Api {
status: u16,
message: String,
},
Configuration(String),
Io(Error),
Utf8(FromUtf8Error),
Base64Decode(DecodeError),
Other(String),
}Variants§
Http(Error)
Serialization(Error)
Cbor(String)
Crypto(String)
AttestationVerificationFailed(String)
Session(String)
KeyExchange(String)
Encryption(String)
Decryption(String)
Authentication(String)
InvalidResponse(String)
Api
Configuration(String)
Io(Error)
Utf8(FromUtf8Error)
Base64Decode(DecodeError)
Other(String)
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_device_clock_problem(&self) -> bool
pub fn is_device_clock_problem(&self) -> bool
True when this is an attestation failure caused by the device clock disagreeing with the enclave’s signed timestamp (wrong date, time or time zone on the device), as opposed to an untrusted or invalid document.
Source§impl Error
impl Error
Sourcepub fn api_status(&self) -> Option<u16>
pub fn api_status(&self) -> Option<u16>
The HTTP status of an Error::Api.
Sourcepub fn api_error_code(&self) -> Option<String>
pub fn api_error_code(&self) -> Option<String>
The backend’s machine-readable code when an Error::Api body carries
one as {"error":{"code":"..."}}: system_one_* validation codes,
usage_limit_reached, model_not_available_on_plan and the like.
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(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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