pub struct JsHydraPlugin { /* private fields */ }
Expand description
Represents a Hydra account in a given vault.
Implementations§
Source§impl JsHydraPlugin
impl JsHydraPlugin
Sourcepub fn init(
vault: &mut JsVault,
unlock_password: &str,
parameters: &JsHydraParameters,
) -> Result<(), JsValue>
pub fn init( vault: &mut JsVault, unlock_password: &str, parameters: &JsHydraParameters, ) -> Result<(), JsValue>
Creates a new Hydra account with the given parameters in the vault. If the same account already exists, an error will be thrown. An existing account has to be retrieved from the vault using {@link get}.
Sourcepub fn get(
vault: &JsVault,
parameters: &JsHydraParameters,
) -> Result<JsHydraPlugin, JsValue>
pub fn get( vault: &JsVault, parameters: &JsHydraParameters, ) -> Result<JsHydraPlugin, JsValue>
Retrieves an existing Hydra account from the vault. If the account is missing, an error will be thrown. A new account can be created with {@link init}.
Sourcepub fn public(&self) -> Result<JsHydraPublic, JsValue>
pub fn public(&self) -> Result<JsHydraPublic, JsValue>
Accessor for the public keys in the Hydra account
Trait Implementations§
Source§impl From<BoundPlugin<Plugin, Public, Private>> for JsHydraPlugin
impl From<BoundPlugin<Plugin, Public, Private>> for JsHydraPlugin
Source§impl From<JsHydraPlugin> for JsValue
impl From<JsHydraPlugin> for JsValue
Source§fn from(value: JsHydraPlugin) -> Self
fn from(value: JsHydraPlugin) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for JsHydraPlugin
impl FromWasmAbi for JsHydraPlugin
Source§impl IntoWasmAbi for JsHydraPlugin
impl IntoWasmAbi for JsHydraPlugin
Source§impl LongRefFromWasmAbi for JsHydraPlugin
impl LongRefFromWasmAbi for JsHydraPlugin
Source§impl OptionFromWasmAbi for JsHydraPlugin
impl OptionFromWasmAbi for JsHydraPlugin
Source§impl OptionIntoWasmAbi for JsHydraPlugin
impl OptionIntoWasmAbi for JsHydraPlugin
Source§impl RefFromWasmAbi for JsHydraPlugin
impl RefFromWasmAbi for JsHydraPlugin
Source§type Anchor = RcRef<JsHydraPlugin>
type Anchor = RcRef<JsHydraPlugin>
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 JsHydraPlugin
impl RefMutFromWasmAbi for JsHydraPlugin
Source§impl TryFromJsValue for JsHydraPlugin
impl TryFromJsValue for JsHydraPlugin
Source§impl VectorFromWasmAbi for JsHydraPlugin
impl VectorFromWasmAbi for JsHydraPlugin
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[JsHydraPlugin]>
Source§impl VectorIntoJsValue for JsHydraPlugin
impl VectorIntoJsValue for JsHydraPlugin
fn vector_into_jsvalue(vector: Box<[JsHydraPlugin]>) -> JsValue
Source§impl VectorIntoWasmAbi for JsHydraPlugin
impl VectorIntoWasmAbi for JsHydraPlugin
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[JsHydraPlugin]>) -> Self::Abi
Source§impl WasmDescribeVector for JsHydraPlugin
impl WasmDescribeVector for JsHydraPlugin
Source§impl Wraps<BoundPlugin<Plugin, Public, Private>> for JsHydraPlugin
impl Wraps<BoundPlugin<Plugin, Public, Private>> for JsHydraPlugin
impl SupportsConstructor for JsHydraPlugin
impl SupportsInstanceProperty for JsHydraPlugin
impl SupportsStaticProperty for JsHydraPlugin
Auto Trait Implementations§
impl Freeze for JsHydraPlugin
impl !RefUnwindSafe for JsHydraPlugin
impl !Send for JsHydraPlugin
impl !Sync for JsHydraPlugin
impl Unpin for JsHydraPlugin
impl !UnwindSafe for JsHydraPlugin
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::Abi
Source§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
.