Struct cardano_serialization_lib::metadata::MetadataMap
source · pub struct MetadataMap(_);
Implementations§
source§impl MetadataMap
impl MetadataMap
pub fn from_bytes(bytes: Vec<u8>) -> Result<MetadataMap, DeserializeError>
source§impl MetadataMap
impl MetadataMap
pub fn from_hex(hex_str: &str) -> Result<MetadataMap, DeserializeError>
source§impl MetadataMap
impl MetadataMap
pub fn new() -> Self
pub fn len(&self) -> usize
pub fn insert( &mut self, key: &TransactionMetadatum, value: &TransactionMetadatum ) -> Option<TransactionMetadatum>
pub fn insert_str( &mut self, key: &str, value: &TransactionMetadatum ) -> Result<Option<TransactionMetadatum>, JsError>
pub fn insert_i32( &mut self, key: i32, value: &TransactionMetadatum ) -> Option<TransactionMetadatum>
pub fn get( &self, key: &TransactionMetadatum ) -> Result<TransactionMetadatum, JsError>
pub fn get_str(&self, key: &str) -> Result<TransactionMetadatum, JsError>
pub fn get_i32(&self, key: i32) -> Result<TransactionMetadatum, JsError>
pub fn has(&self, key: &TransactionMetadatum) -> bool
pub fn keys(&self) -> MetadataList
Trait Implementations§
source§impl Clone for MetadataMap
impl Clone for MetadataMap
source§fn clone(&self) -> MetadataMap
fn clone(&self) -> MetadataMap
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 MetadataMap
impl Debug for MetadataMap
source§impl Deserialize for MetadataMap
impl Deserialize for MetadataMap
fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R> ) -> Result<Self, DeserializeError>
source§impl Hash for MetadataMap
impl Hash for MetadataMap
source§impl Ord for MetadataMap
impl Ord for MetadataMap
source§fn cmp(&self, other: &MetadataMap) -> Ordering
fn cmp(&self, other: &MetadataMap) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<MetadataMap> for MetadataMap
impl PartialEq<MetadataMap> for MetadataMap
source§fn eq(&self, other: &MetadataMap) -> bool
fn eq(&self, other: &MetadataMap) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<MetadataMap> for MetadataMap
impl PartialOrd<MetadataMap> for MetadataMap
source§fn partial_cmp(&self, other: &MetadataMap) -> Option<Ordering>
fn partial_cmp(&self, other: &MetadataMap) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more