pub enum FfiHardwareSignerError {
AuthCancelled {
detail: String,
},
Unavailable {
detail: String,
},
NotFound {
detail: String,
},
Exportable {
detail: String,
},
Backend {
detail: String,
},
}Expand description
Failure surfaced by a foreign FfiHardwareSigner. Mirrors capsule-core’s
HardwareSignerError variant for variant — it is the same contract, declared in the
capsule_sdk namespace because core’s own type carries no uniffi derive.
The error is thrown by foreign code — it is the declared error of the
FfiHardwareSigner and FfiHardwareKeyAgreement foreign traits — so Rust must lift
it, and uniffi lifts only a non-flat error. Every variant therefore carries a named
detail field (the element’s own English diagnostic), which also gives the Kotlin
exceptions and Swift cases the same (detail) shape. Core’s error keeps detail only on
Backend; for the other variants it is logged at the seam and dropped.
Variants§
AuthCancelled
The user cancelled the biometric / the element refused authentication.
No secure element is available on this device.
NotFound
No key exists for the requested alias.
Exportable
The private key was readable — non-exportability is violated (a failure).
Backend
Any other backend error.
Trait Implementations§
Source§impl Clone for FfiHardwareSignerError
impl Clone for FfiHardwareSignerError
Source§fn clone(&self) -> FfiHardwareSignerError
fn clone(&self) -> FfiHardwareSignerError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<UT> ConvertError<UT> for FfiHardwareSignerError
impl<UT> ConvertError<UT> for FfiHardwareSignerError
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl Debug for FfiHardwareSignerError
impl Debug for FfiHardwareSignerError
Source§impl Display for FfiHardwareSignerError
impl Display for FfiHardwareSignerError
impl Eq for FfiHardwareSignerError
Source§impl Error for FfiHardwareSignerError
impl Error for FfiHardwareSignerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl<UT> FfiConverter<UT> for FfiHardwareSignerError
impl<UT> FfiConverter<UT> for FfiHardwareSignerError
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<FfiHardwareSignerError> for HardwareSignerError
impl From<FfiHardwareSignerError> for HardwareSignerError
Source§fn from(err: FfiHardwareSignerError) -> Self
fn from(err: FfiHardwareSignerError) -> Self
Source§impl From<UnexpectedUniFFICallbackError> for FfiHardwareSignerError
A foreign element that throws something other than FfiHardwareSignerError (an
unchecked KeyStoreException, a Swift error of another type) or breaks the FFI contract
reaches Rust as an unexpected callback error. Without this conversion uniffi panics on
it — inside a workspace call, with the workspace lock held — so it is lifted as a typed
Backend failure instead.
impl From<UnexpectedUniFFICallbackError> for FfiHardwareSignerError
A foreign element that throws something other than FfiHardwareSignerError (an
unchecked KeyStoreException, a Swift error of another type) or breaks the FFI contract
reaches Rust as an unexpected callback error. Without this conversion uniffi panics on
it — inside a workspace call, with the workspace lock held — so it is lifted as a typed
Backend failure instead.
Source§impl<UT> Lift<UT> for FfiHardwareSignerError
impl<UT> Lift<UT> for FfiHardwareSignerError
Source§impl<UT> LiftRef<UT> for FfiHardwareSignerError
impl<UT> LiftRef<UT> for FfiHardwareSignerError
Source§impl<UT> LiftReturn<UT> for FfiHardwareSignerError
impl<UT> LiftReturn<UT> for FfiHardwareSignerError
Source§type ReturnType = <FfiHardwareSignerError as Lift<UT>>::FfiType
type ReturnType = <FfiHardwareSignerError as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for FfiHardwareSignerError
impl<UT> Lower<UT> for FfiHardwareSignerError
Source§impl<UT> LowerError<UT> for FfiHardwareSignerError
impl<UT> LowerError<UT> for FfiHardwareSignerError
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for FfiHardwareSignerError
impl<UT> LowerReturn<UT> for FfiHardwareSignerError
Source§type ReturnType = <FfiHardwareSignerError as Lower<UT>>::FfiType
type ReturnType = <FfiHardwareSignerError as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl PartialEq for FfiHardwareSignerError
impl PartialEq for FfiHardwareSignerError
Source§fn eq(&self, other: &FfiHardwareSignerError) -> bool
fn eq(&self, other: &FfiHardwareSignerError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FfiHardwareSignerError
Source§impl<UT> TypeId<UT> for FfiHardwareSignerError
impl<UT> TypeId<UT> for FfiHardwareSignerError
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for FfiHardwareSignerError
impl RefUnwindSafe for FfiHardwareSignerError
impl Send for FfiHardwareSignerError
impl Sync for FfiHardwareSignerError
impl Unpin for FfiHardwareSignerError
impl UnsafeUnpin for FfiHardwareSignerError
impl UnwindSafe for FfiHardwareSignerError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
§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<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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