pub struct WasmProviderManager { /* private fields */ }Expand description
WASM-compatible provider manager
This manager provides JavaScript-compatible bindings for provider operations:
- Integrates with the new modular architecture
- Includes security validation
- Provides consistent error handling
- Supports all provider operations
Implementations§
Source§impl WasmProviderManager
impl WasmProviderManager
Sourcepub fn new() -> WasmProviderManager
pub fn new() -> WasmProviderManager
Create a new WASM provider manager
Source§impl WasmProviderManager
impl WasmProviderManager
Sourcepub fn get_provider_info(&self) -> String
pub fn get_provider_info(&self) -> String
Get provider information
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 get_algorithm_info(&self, algorithm: &str) -> Result<JsValue, JsValue>
pub fn get_algorithm_info(&self, algorithm: &str) -> Result<JsValue, JsValue>
Get algorithm information
Sourcepub fn get_all_algorithms(&self) -> String
pub fn get_all_algorithms(&self) -> String
Get all supported algorithms
Sourcepub fn get_kem_algorithms(&self) -> Vec<String>
pub fn get_kem_algorithms(&self) -> Vec<String>
Get KEM algorithms
Sourcepub fn get_signature_algorithms(&self) -> Vec<String>
pub fn get_signature_algorithms(&self) -> Vec<String>
Get signature algorithms
Sourcepub fn get_hash_algorithms(&self) -> Vec<String>
pub fn get_hash_algorithms(&self) -> Vec<String>
Get hash algorithms
Sourcepub fn get_aead_algorithms(&self) -> Vec<String>
pub fn get_aead_algorithms(&self) -> Vec<String>
Get AEAD algorithms
Sourcepub fn validate_algorithm_params(
&self,
algorithm: &str,
key_size: Option<usize>,
message_size: Option<usize>,
nonce_size: Option<usize>,
) -> Result<bool, JsValue>
pub fn validate_algorithm_params( &self, algorithm: &str, key_size: Option<usize>, message_size: Option<usize>, nonce_size: Option<usize>, ) -> Result<bool, JsValue>
Validate algorithm parameters
Sourcepub fn get_security_recommendations(&self) -> String
pub fn get_security_recommendations(&self) -> String
Get security recommendations
Sourcepub fn get_performance_benchmarks(&self) -> String
pub fn get_performance_benchmarks(&self) -> String
Get performance benchmarks
Trait Implementations§
Source§impl Default for WasmProviderManager
impl Default for WasmProviderManager
Source§impl From<WasmProviderManager> for JsValue
impl From<WasmProviderManager> for JsValue
Source§fn from(value: WasmProviderManager) -> Self
fn from(value: WasmProviderManager) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmProviderManager
impl FromWasmAbi for WasmProviderManager
Source§impl IntoWasmAbi for WasmProviderManager
impl IntoWasmAbi for WasmProviderManager
Source§impl LongRefFromWasmAbi for WasmProviderManager
impl LongRefFromWasmAbi for WasmProviderManager
Source§type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<WasmProviderManager>
type Anchor = RcRef<WasmProviderManager>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl RefFromWasmAbi for WasmProviderManager
impl RefFromWasmAbi for WasmProviderManager
Source§type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<WasmProviderManager>
type Anchor = RcRef<WasmProviderManager>
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§impl RefMutFromWasmAbi for WasmProviderManager
impl RefMutFromWasmAbi for WasmProviderManager
Source§type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
type Abi = WasmPtr<WasmRefCell<WasmProviderManager>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<WasmProviderManager>
type Anchor = RcRefMut<WasmProviderManager>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn ref_mut_from_abi(js: Self::Abi) -> Self::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl TryFromJsValue for WasmProviderManager
impl TryFromJsValue for WasmProviderManager
Source§impl VectorFromWasmAbi for WasmProviderManager
impl VectorFromWasmAbi for WasmProviderManager
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmProviderManager]>
Source§impl VectorIntoWasmAbi for WasmProviderManager
impl VectorIntoWasmAbi for WasmProviderManager
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmProviderManager]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmProviderManager
impl WasmDescribeVector for WasmProviderManager
impl SupportsConstructor for WasmProviderManager
impl SupportsInstanceProperty for WasmProviderManager
impl SupportsStaticProperty for WasmProviderManager
Auto Trait Implementations§
impl Freeze for WasmProviderManager
impl RefUnwindSafe for WasmProviderManager
impl Send for WasmProviderManager
impl Sync for WasmProviderManager
impl Unpin for WasmProviderManager
impl UnsafeUnpin for WasmProviderManager
impl UnwindSafe for WasmProviderManager
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> 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.