Struct cml_chain_wasm::byron::AddrAttributes
source · 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 copy 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 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
§type Anchor = Ref<'static, AddrAttributes>
type Anchor = Ref<'static, 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
Auto Trait Implementations§
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> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§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
.