pub struct AddrAttributes(/* private fields */);Implementations§
Source§impl AddrAttributes
impl AddrAttributes
pub fn new_bootstrap_era( hdap: Option<HDAddressPayload>, protocol_magic: Option<ProtocolMagic>, ) -> Self
pub fn new_single_key( pubk: &Bip32PublicKey, hdap: Option<HDAddressPayload>, protocol_magic: ProtocolMagic, ) -> Self
Source§impl AddrAttributes
impl AddrAttributes
Sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes.
- This type does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
Sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<AddrAttributes, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<AddrAttributes, JsError>
- Create this type from CBOR bytes
Sourcepub fn to_cbor_hex(&self) -> String
pub fn to_cbor_hex(&self) -> String
- Serialize this type to CBOR bytes encoded as a hex string (useful for working with CIP30).
- This type does NOT support fine-tuned encoding options so this may or may not be
- canonical CBOR and may or may not preserve round-trip encodings.
Sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<AddrAttributes, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<AddrAttributes, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
Source§impl AddrAttributes
impl AddrAttributes
pub fn set_stake_distribution(&mut self, stake_distribution: &StakeDistribution)
pub fn stake_distribution(&self) -> Option<StakeDistribution>
pub fn set_derivation_path(&mut self, derivation_path: &HDAddressPayload)
pub fn derivation_path(&self) -> Option<HDAddressPayload>
pub fn set_protocol_magic(&mut self, protocol_magic: &ProtocolMagic)
pub fn protocol_magic(&self) -> Option<ProtocolMagic>
pub fn new() -> Self
Trait Implementations§
Source§impl AsRef<AddrAttributes> for AddrAttributes
impl AsRef<AddrAttributes> for AddrAttributes
Source§fn as_ref(&self) -> &AddrAttributes
fn as_ref(&self) -> &AddrAttributes
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for AddrAttributes
impl Clone for AddrAttributes
Source§fn clone(&self) -> AddrAttributes
fn clone(&self) -> AddrAttributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddrAttributes
impl Debug for AddrAttributes
Source§impl From<AddrAttributes> for AddrAttributes
impl From<AddrAttributes> for AddrAttributes
Source§fn from(native: AddrAttributes) -> Self
fn from(native: AddrAttributes) -> Self
Converts to this type from the input type.
Source§impl From<AddrAttributes> for JsValue
impl From<AddrAttributes> for JsValue
Source§fn from(value: AddrAttributes) -> Self
fn from(value: AddrAttributes) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for AddrAttributes
impl FromWasmAbi for AddrAttributes
Source§impl Into<AddrAttributes> for AddrAttributes
impl Into<AddrAttributes> for AddrAttributes
Source§fn into(self) -> AddrAttributes
fn into(self) -> AddrAttributes
Converts this type into the (usually inferred) input type.
Source§impl IntoWasmAbi for AddrAttributes
impl IntoWasmAbi for AddrAttributes
Source§impl LongRefFromWasmAbi for AddrAttributes
impl LongRefFromWasmAbi for AddrAttributes
Source§impl OptionFromWasmAbi for AddrAttributes
impl OptionFromWasmAbi for AddrAttributes
Source§impl OptionIntoWasmAbi for AddrAttributes
impl OptionIntoWasmAbi for AddrAttributes
Source§impl RefFromWasmAbi for AddrAttributes
impl RefFromWasmAbi for AddrAttributes
Source§type Anchor = RcRef<AddrAttributes>
type Anchor = RcRef<AddrAttributes>
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 AddrAttributes
impl RefMutFromWasmAbi for AddrAttributes
Source§impl TryFromJsValue for AddrAttributes
impl TryFromJsValue for AddrAttributes
Source§impl VectorFromWasmAbi for AddrAttributes
impl VectorFromWasmAbi for AddrAttributes
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[AddrAttributes]>
Source§impl VectorIntoJsValue for AddrAttributes
impl VectorIntoJsValue for AddrAttributes
fn vector_into_jsvalue(vector: Box<[AddrAttributes]>) -> JsValue
Source§impl VectorIntoWasmAbi for AddrAttributes
impl VectorIntoWasmAbi for AddrAttributes
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[AddrAttributes]>) -> Self::Abi
Source§impl WasmDescribeVector for AddrAttributes
impl WasmDescribeVector for AddrAttributes
impl SupportsConstructor for AddrAttributes
impl SupportsInstanceProperty for AddrAttributes
impl SupportsStaticProperty for AddrAttributes
Auto Trait Implementations§
impl Freeze for AddrAttributes
impl RefUnwindSafe for AddrAttributes
impl Send for AddrAttributes
impl Sync for AddrAttributes
impl Unpin for AddrAttributes
impl UnwindSafe for AddrAttributes
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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.