Enum Error
pub enum Error {
InvalidKey(String),
InvalidNonce(String),
AuthenticationFailed,
NotExtractable,
NotPermitted(String),
Unsupported(String),
Other(String),
Extension(ExtensionError),
}Expand description
The shared core’s key-material and policy types, re-exported for the
embedder key constructors (SigningKey::from_material,
VerifyingKey::from_material).
The WIT types.error variant, mirrored case for case. Implementations
convert values of this type into their generated error types with the
mechanical From that [impl_conversions!] defines; the message strings
carried here are the ones the WIT contracts specify, shared verbatim by
both implementations.
Variants§
InvalidKey(String)
WIT invalid-key(string).
InvalidNonce(String)
WIT invalid-nonce(string).
AuthenticationFailed
WIT authentication-failed.
NotExtractable
WIT not-extractable.
NotPermitted(String)
WIT not-permitted(string).
Unsupported(String)
WIT unsupported(string).
Other(String)
WIT other(string).
Extension(ExtensionError)
WIT extension(extension-error).
Implementations§
§impl Error
impl Error
pub fn collision_detected() -> Error
pub fn collision_detected() -> Error
The sha1-checked rejecting posture’s error: extension condition
("polymorph:webcrypto", "collision-detected"), with the message both
Rust implementations share verbatim.
pub fn message_too_long(bound_bytes: usize, got_bytes: usize) -> Error
pub fn message_too_long(bound_bytes: usize, got_bytes: usize) -> Error
The public-encryption over-bound error on encrypt/wrap:
extension condition ("polymorph:webcrypto", "message-too-long"), with
the key’s plaintext bound and the rejected length in the message.
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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