pub struct MetadataMap(/* private fields */);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 duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataMap
impl Debug for MetadataMap
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 for MetadataMap
impl PartialEq for MetadataMap
Source§impl PartialOrd for MetadataMap
impl PartialOrd for MetadataMap
Source§impl Serialize for MetadataMap
impl Serialize for MetadataMap
fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W>, ) -> Result<&'se mut Serializer<W>>
impl Eq for MetadataMap
impl StructuralPartialEq for MetadataMap
Auto Trait Implementations§
impl Freeze for MetadataMap
impl RefUnwindSafe for MetadataMap
impl Send for MetadataMap
impl Sync for MetadataMap
impl Unpin for MetadataMap
impl UnwindSafe for MetadataMap
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more