pub enum CapsuleError {
Show 22 variants
Generic(String),
DEKNotFound(String),
DEKUnexpectedType(String),
DEKWrongLength(String),
CBOREncodeFailed(String),
CBORDecodeFailed(String),
EncryptionFailure(String),
DecryptionFailure(String),
BadMagic(String),
UnsupportedVersion(String),
CapsuleAlreadySealed(String),
StreamWriteFailure(String),
StreamReadFailure(String),
FileIOError(String),
InsufficientPermissions(String),
DRDecryptError(String),
CapsuleOpenError(String),
CapsuleUpdateError(String),
EndOfRow,
EndOfCapsule,
CapsuleAccessDeniedByPolicy,
RowAccessDeniedByPolicy,
}Expand description
CapsuleError contains the possible errors that can be returned to the consumer from operations in this module.
Variants§
Generic(String)
Generic is a generic error for all error types without a more specific type.
DEKNotFound(String)
DEKNotFound is returned from the data encryption key for a capsule cannot be found.
DEKUnexpectedType(String)
DEKUnexpectedType is returned when the library finds a data encryption key with an unknown or unexpected type.
DEKWrongLength(String)
DEKUnexpectedType is returned when the library finds a data encryption key with an unexpected length
CBOREncodeFailed(String)
CBOREncodeFailed is returned when the library fails to encode a value to CBOR.
CBORDecodeFailed(String)
CBOREncodeFailed is returned when the library fails to decode what is expected to be a CBOR-encoded value.
EncryptionFailure(String)
EncryptionFailure is returned when an encryption operation fails.
DecryptionFailure(String)
DecryptionFailure is returned when a decryption operation fails.
BadMagic(String)
BadMagic is returned when the library attempts to read a bundle header but does not find the correct magic value in the header.
UnsupportedVersion(String)
UnsupportedVersion is returned when a capsule bundle header contains an unsupported version.
CapsuleAlreadySealed(String)
CapsuleAlreadySealed is returned when attempting to seal a capsule that is already sealed.
StreamWriteFailure(String)
StreamWriteFailure is returned when the library cannot write to an I/O stream.
StreamReadFailure(String)
StreamWriteFailure is returned when the library cannot read from an I/O stream.
FileIOError(String)
FileIOError is returned when the library encounters an I/O error when attempting to read a capsule bundle.
InsufficientPermissions(String)
InsufficientPermissions is returned when attempting to read a capsule with insufficient permissions.
DRDecryptError(String)
DRDecryptError is returned when attempting to invoke the DR token decoder fails.
CapsuleOpenError(String)
CapsuleOpenError is returned when attempting to open a capsule fails.
CapsuleUpdateError(String)
CapsuleUpdateError is returned when the library encounters an error when attempting to update a capsule.
EndOfRow
EndOfCapsule
CapsuleAccessDeniedByPolicy
RowAccessDeniedByPolicy
Trait Implementations§
Source§impl AsRef<str> for CapsuleError
impl AsRef<str> for CapsuleError
Source§impl Clone for CapsuleError
impl Clone for CapsuleError
Source§fn clone(&self) -> CapsuleError
fn clone(&self) -> CapsuleError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapsuleError
impl Debug for CapsuleError
Auto Trait Implementations§
impl Freeze for CapsuleError
impl RefUnwindSafe for CapsuleError
impl Send for CapsuleError
impl Sync for CapsuleError
impl Unpin for CapsuleError
impl UnsafeUnpin for CapsuleError
impl UnwindSafe for CapsuleError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more