pub struct SigKeypair {
pub public_key: SigPublicKey,
pub secret_key: SigSecretKey,
}Expand description
Signature keypair with automatic memory zeroization
Fields§
§public_key: SigPublicKey§secret_key: SigSecretKeyImplementations§
Source§impl SigKeypair
impl SigKeypair
pub fn new(public_key: Vec<u8>, secret_key: Vec<u8>) -> SigKeypair
pub fn public_key(&self) -> &SigPublicKey
pub fn secret_key(&self) -> &SigSecretKey
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SigKeypair
impl<'de> Deserialize<'de> for SigKeypair
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SigKeypair, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SigKeypair, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SigKeypair> for JsValue
impl From<SigKeypair> for JsValue
Source§fn from(value: SigKeypair) -> JsValue
fn from(value: SigKeypair) -> JsValue
Converts to this type from the input type.
Source§impl FromWasmAbi for SigKeypair
impl FromWasmAbi for SigKeypair
Source§type Abi = WasmPtr<WasmRefCell<SigKeypair>>
type Abi = WasmPtr<WasmRefCell<SigKeypair>>
The Wasm ABI type that this converts from when coming back out from the
ABI boundary.
Source§unsafe fn from_abi(js: <SigKeypair as FromWasmAbi>::Abi) -> SigKeypair
unsafe fn from_abi(js: <SigKeypair as FromWasmAbi>::Abi) -> SigKeypair
Source§impl IntoWasmAbi for SigKeypair
impl IntoWasmAbi for SigKeypair
Source§type Abi = WasmPtr<WasmRefCell<SigKeypair>>
type Abi = WasmPtr<WasmRefCell<SigKeypair>>
The Wasm ABI type that this converts into when crossing the ABI
boundary.
Source§fn into_abi(self) -> <SigKeypair as IntoWasmAbi>::Abi
fn into_abi(self) -> <SigKeypair as IntoWasmAbi>::Abi
Convert
self into Self::Abi so that it can be sent across the wasm
ABI boundary.Source§impl LongRefFromWasmAbi for SigKeypair
impl LongRefFromWasmAbi for SigKeypair
Source§type Abi = WasmPtr<WasmRefCell<SigKeypair>>
type Abi = WasmPtr<WasmRefCell<SigKeypair>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRef<SigKeypair>
type Anchor = RcRef<SigKeypair>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(
js: <SigKeypair as LongRefFromWasmAbi>::Abi,
) -> <SigKeypair as LongRefFromWasmAbi>::Anchor
unsafe fn long_ref_from_abi( js: <SigKeypair as LongRefFromWasmAbi>::Abi, ) -> <SigKeypair as LongRefFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl OptionFromWasmAbi for SigKeypair
impl OptionFromWasmAbi for SigKeypair
Source§fn is_none(abi: &<SigKeypair as FromWasmAbi>::Abi) -> bool
fn is_none(abi: &<SigKeypair 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 SigKeypair
impl OptionIntoWasmAbi for SigKeypair
Source§fn none() -> <SigKeypair as IntoWasmAbi>::Abi
fn none() -> <SigKeypair 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 SigKeypair
impl RefFromWasmAbi for SigKeypair
Source§type Abi = WasmPtr<WasmRefCell<SigKeypair>>
type Abi = WasmPtr<WasmRefCell<SigKeypair>>
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = RcRef<SigKeypair>
type Anchor = RcRef<SigKeypair>
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: <SigKeypair as RefFromWasmAbi>::Abi,
) -> <SigKeypair as RefFromWasmAbi>::Anchor
unsafe fn ref_from_abi( js: <SigKeypair as RefFromWasmAbi>::Abi, ) -> <SigKeypair as RefFromWasmAbi>::Anchor
Source§impl RefMutFromWasmAbi for SigKeypair
impl RefMutFromWasmAbi for SigKeypair
Source§type Abi = WasmPtr<WasmRefCell<SigKeypair>>
type Abi = WasmPtr<WasmRefCell<SigKeypair>>
Same as
RefFromWasmAbi::AbiSource§type Anchor = RcRefMut<SigKeypair>
type Anchor = RcRefMut<SigKeypair>
Same as
RefFromWasmAbi::AnchorSource§unsafe fn ref_mut_from_abi(
js: <SigKeypair as RefMutFromWasmAbi>::Abi,
) -> <SigKeypair as RefMutFromWasmAbi>::Anchor
unsafe fn ref_mut_from_abi( js: <SigKeypair as RefMutFromWasmAbi>::Abi, ) -> <SigKeypair as RefMutFromWasmAbi>::Anchor
Same as
RefFromWasmAbi::ref_from_abiSource§impl Serialize for SigKeypair
impl Serialize for SigKeypair
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFromJsValue for SigKeypair
impl TryFromJsValue for SigKeypair
Source§fn try_from_js_value(value: JsValue) -> Result<SigKeypair, JsValue>
fn try_from_js_value(value: JsValue) -> Result<SigKeypair, JsValue>
Performs the conversion.
Source§fn try_from_js_value_ref(value: &JsValue) -> Option<SigKeypair>
fn try_from_js_value_ref(value: &JsValue) -> Option<SigKeypair>
Performs the conversion.
Source§impl VectorFromWasmAbi for SigKeypair
impl VectorFromWasmAbi for SigKeypair
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi( js: <SigKeypair as VectorFromWasmAbi>::Abi, ) -> Box<[SigKeypair]>
Source§impl VectorIntoWasmAbi for SigKeypair
impl VectorIntoWasmAbi for SigKeypair
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi( vector: Box<[SigKeypair]>, ) -> <SigKeypair as VectorIntoWasmAbi>::Abi
Auto Trait Implementations§
impl Freeze for SigKeypair
impl RefUnwindSafe for SigKeypair
impl Send for SigKeypair
impl Sync for SigKeypair
impl Unpin for SigKeypair
impl UnsafeUnpin for SigKeypair
impl UnwindSafe for SigKeypair
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.