Struct cml_chain_wasm::byron::ByronAddress
source · pub struct ByronAddress(/* private fields */);Implementations§
source§impl ByronAddress
impl ByronAddress
pub fn to_base58(&self) -> String
pub fn from_base58(s: &str) -> Result<ByronAddress, JsError>
pub fn is_valid(s: &str) -> bool
pub fn to_address(&self) -> Address
pub fn from_address(addr: &Address) -> Option<ByronAddress>
pub fn from_address_content(address_content: &AddressContent) -> Self
source§impl ByronAddress
impl ByronAddress
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<ByronAddress, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<ByronAddress, 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<ByronAddress, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<ByronAddress, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl ByronAddress
impl ByronAddress
pub fn content(&self) -> AddressContent
pub fn crc(&self) -> Crc32
pub fn new(content: &AddressContent, crc: &Crc32) -> Self
Trait Implementations§
source§impl AsRef<ByronAddress> for ByronAddress
impl AsRef<ByronAddress> for ByronAddress
source§fn as_ref(&self) -> &ByronAddress
fn as_ref(&self) -> &ByronAddress
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for ByronAddress
impl Clone for ByronAddress
source§fn clone(&self) -> ByronAddress
fn clone(&self) -> ByronAddress
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 ByronAddress
impl Debug for ByronAddress
source§impl From<ByronAddress> for ByronAddress
impl From<ByronAddress> for ByronAddress
source§fn from(native: ByronAddress) -> Self
fn from(native: ByronAddress) -> Self
Converts to this type from the input type.
source§impl From<ByronAddress> for JsValue
impl From<ByronAddress> for JsValue
source§fn from(value: ByronAddress) -> Self
fn from(value: ByronAddress) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for ByronAddress
impl FromWasmAbi for ByronAddress
source§impl Into<ByronAddress> for ByronAddress
impl Into<ByronAddress> for ByronAddress
source§fn into(self) -> ByronAddress
fn into(self) -> ByronAddress
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for ByronAddress
impl IntoWasmAbi for ByronAddress
source§impl OptionFromWasmAbi for ByronAddress
impl OptionFromWasmAbi for ByronAddress
source§impl OptionIntoWasmAbi for ByronAddress
impl OptionIntoWasmAbi for ByronAddress
source§impl RefFromWasmAbi for ByronAddress
impl RefFromWasmAbi for ByronAddress
§type Anchor = Ref<'static, ByronAddress>
type Anchor = Ref<'static, ByronAddress>
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 ByronAddress
impl RefMutFromWasmAbi for ByronAddress
Auto Trait Implementations§
impl Freeze for ByronAddress
impl RefUnwindSafe for ByronAddress
impl Send for ByronAddress
impl Sync for ByronAddress
impl Unpin for ByronAddress
impl UnwindSafe for ByronAddress
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::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.