pub struct WasmCryptoProvider { /* private fields */ }Expand description
WASM-compatible CryptoProvider wrapper
This wrapper provides JavaScript-compatible bindings for the crypto provider:
- Integrates with the new modular architecture
- Provides consistent error handling
- Supports all cryptographic operations
Implementations§
Source§impl WasmCryptoProvider
impl WasmCryptoProvider
Sourcepub fn new() -> WasmCryptoProvider
pub fn new() -> WasmCryptoProvider
Create a new WASM CryptoProvider
Source§impl WasmCryptoProvider
impl WasmCryptoProvider
Sourcepub fn is_algorithm_supported(&self, _algorithm: &str) -> bool
pub fn is_algorithm_supported(&self, _algorithm: &str) -> bool
Check if an algorithm is supported
Sourcepub fn supported_algorithms(&self) -> String
pub fn supported_algorithms(&self) -> String
Get supported algorithms by category
Trait Implementations§
Source§impl Default for WasmCryptoProvider
impl Default for WasmCryptoProvider
Source§fn default() -> WasmCryptoProvider
fn default() -> WasmCryptoProvider
Returns the “default value” for a type. Read more
Source§impl From<WasmCryptoProvider> for JsValue
impl From<WasmCryptoProvider> for JsValue
Source§fn from(value: WasmCryptoProvider) -> JsValue
fn from(value: WasmCryptoProvider) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmCryptoProvider
impl FromWasmAbi for WasmCryptoProvider
Source§type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
The Wasm ABI type that this converts from when coming back out from the
ABI boundary.
Source§unsafe fn from_abi(
js: <WasmCryptoProvider as FromWasmAbi>::Abi,
) -> WasmCryptoProvider
unsafe fn from_abi( js: <WasmCryptoProvider as FromWasmAbi>::Abi, ) -> WasmCryptoProvider
Source§impl IntoWasmAbi for WasmCryptoProvider
impl IntoWasmAbi for WasmCryptoProvider
Source§type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
The Wasm ABI type that this converts into when crossing the ABI
boundary.
Source§fn into_abi(self) -> <WasmCryptoProvider as IntoWasmAbi>::Abi
fn into_abi(self) -> <WasmCryptoProvider as IntoWasmAbi>::Abi
Convert
self into Self::Abi so that it can be sent across the wasm
ABI boundary.Source§impl LongRefFromWasmAbi for WasmCryptoProvider
impl LongRefFromWasmAbi for WasmCryptoProvider
Source§type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<WasmCryptoProvider>
type Anchor = RcRef<WasmCryptoProvider>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(
js: <WasmCryptoProvider as LongRefFromWasmAbi>::Abi,
) -> <WasmCryptoProvider as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <WasmCryptoProvider as LongRefFromWasmAbi>::Abi, ) -> <WasmCryptoProvider as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for WasmCryptoProvider
impl OptionFromWasmAbi for WasmCryptoProvider
Source§fn is_none(abi: &<WasmCryptoProvider as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<WasmCryptoProvider as FromWasmAbi>::Abi) -> bool
Tests whether the argument is a “none” instance. If so it will be
deserialized as
None, and otherwise it will be passed to
FromWasmAbi.Source§impl OptionIntoWasmAbi for WasmCryptoProvider
impl OptionIntoWasmAbi for WasmCryptoProvider
Source§fn none() -> <WasmCryptoProvider as IntoWasmAbi>::Abi
fn none() -> <WasmCryptoProvider as IntoWasmAbi>::Abi
Returns an ABI instance indicating “none”, which JS will interpret as
the
None branch of this option. Read moreSource§impl RefFromWasmAbi for WasmCryptoProvider
impl RefFromWasmAbi for WasmCryptoProvider
Source§type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<WasmCryptoProvider>
type Anchor = RcRef<WasmCryptoProvider>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§unsafe fn ref_from_abi(
js: <WasmCryptoProvider as RefFromWasmAbi>::Abi,
) -> <WasmCryptoProvider as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <WasmCryptoProvider as RefFromWasmAbi>::Abi, ) -> <WasmCryptoProvider as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for WasmCryptoProvider
impl RefMutFromWasmAbi for WasmCryptoProvider
Source§type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
type Abi = WasmPtr<WasmRefCell<WasmCryptoProvider>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<WasmCryptoProvider>
type Anchor = RcRefMut<WasmCryptoProvider>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(
js: <WasmCryptoProvider as RefMutFromWasmAbi>::Abi,
) -> <WasmCryptoProvider as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <WasmCryptoProvider as RefMutFromWasmAbi>::Abi, ) -> <WasmCryptoProvider as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for WasmCryptoProvider
impl TryFromJsValue for WasmCryptoProvider
Source§fn try_from_js_value(value: JsValue) -> Result<WasmCryptoProvider, JsValue>
fn try_from_js_value(value: JsValue) -> Result<WasmCryptoProvider, JsValue>
Performs the conversion.
Source§fn try_from_js_value_ref(value: &JsValue) -> Option<WasmCryptoProvider>
fn try_from_js_value_ref(value: &JsValue) -> Option<WasmCryptoProvider>
Performs the conversion.
Source§impl VectorFromWasmAbi for WasmCryptoProvider
impl VectorFromWasmAbi for WasmCryptoProvider
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <WasmCryptoProvider as VectorFromWasmAbi>::Abi, ) -> Box<[WasmCryptoProvider]>
Source§impl VectorIntoWasmAbi for WasmCryptoProvider
impl VectorIntoWasmAbi for WasmCryptoProvider
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[WasmCryptoProvider]>, ) -> <WasmCryptoProvider as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for WasmCryptoProvider
impl RefUnwindSafe for WasmCryptoProvider
impl Send for WasmCryptoProvider
impl Sync for WasmCryptoProvider
impl Unpin for WasmCryptoProvider
impl UnsafeUnpin for WasmCryptoProvider
impl UnwindSafe for WasmCryptoProvider
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
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.