Struct cml_chain_wasm::certs::PoolMetadata
source · pub struct PoolMetadata(/* private fields */);Implementations§
source§impl PoolMetadata
impl PoolMetadata
sourcepub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
pub fn to_cbor_bytes(&self) -> Vec<u8> ⓘ
- Serialize this type to CBOR bytes
- This type type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
sourcepub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<PoolMetadata, JsError>
pub fn from_cbor_bytes(cbor_bytes: &[u8]) -> Result<PoolMetadata, 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 type supports encoding preservation so this will preserve round-trip CBOR formats.
- If created from scratch the CBOR will be canonical.
sourcepub fn from_cbor_hex(cbor_bytes: &str) -> Result<PoolMetadata, JsError>
pub fn from_cbor_hex(cbor_bytes: &str) -> Result<PoolMetadata, JsError>
- Create this type from the CBOR bytes encoded as a hex string.
- This is useful for interfacing with CIP30
source§impl PoolMetadata
impl PoolMetadata
source§impl PoolMetadata
impl PoolMetadata
pub fn url(&self) -> Url
pub fn pool_metadata_hash(&self) -> PoolMetadataHash
pub fn new(url: &Url, pool_metadata_hash: &PoolMetadataHash) -> Self
Trait Implementations§
source§impl AsRef<PoolMetadata> for PoolMetadata
impl AsRef<PoolMetadata> for PoolMetadata
source§fn as_ref(&self) -> &PoolMetadata
fn as_ref(&self) -> &PoolMetadata
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Clone for PoolMetadata
impl Clone for PoolMetadata
source§fn clone(&self) -> PoolMetadata
fn clone(&self) -> PoolMetadata
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 PoolMetadata
impl Debug for PoolMetadata
source§impl From<PoolMetadata> for JsValue
impl From<PoolMetadata> for JsValue
source§fn from(value: PoolMetadata) -> Self
fn from(value: PoolMetadata) -> Self
Converts to this type from the input type.
source§impl From<PoolMetadata> for PoolMetadata
impl From<PoolMetadata> for PoolMetadata
source§fn from(native: PoolMetadata) -> Self
fn from(native: PoolMetadata) -> Self
Converts to this type from the input type.
source§impl FromWasmAbi for PoolMetadata
impl FromWasmAbi for PoolMetadata
source§impl Into<PoolMetadata> for PoolMetadata
impl Into<PoolMetadata> for PoolMetadata
source§fn into(self) -> PoolMetadata
fn into(self) -> PoolMetadata
Converts this type into the (usually inferred) input type.
source§impl IntoWasmAbi for PoolMetadata
impl IntoWasmAbi for PoolMetadata
source§impl OptionFromWasmAbi for PoolMetadata
impl OptionFromWasmAbi for PoolMetadata
source§impl OptionIntoWasmAbi for PoolMetadata
impl OptionIntoWasmAbi for PoolMetadata
source§impl RefFromWasmAbi for PoolMetadata
impl RefFromWasmAbi for PoolMetadata
§type Anchor = Ref<'static, PoolMetadata>
type Anchor = Ref<'static, PoolMetadata>
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 PoolMetadata
impl RefMutFromWasmAbi for PoolMetadata
Auto Trait Implementations§
impl Freeze for PoolMetadata
impl RefUnwindSafe for PoolMetadata
impl Send for PoolMetadata
impl Sync for PoolMetadata
impl Unpin for PoolMetadata
impl UnwindSafe for PoolMetadata
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> 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,
§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.