Struct cardano_serialization_lib::Mint
source · pub struct Mint(_);
Implementations§
source§impl Mint
impl Mint
pub fn from_bytes(bytes: Vec<u8>) -> Result<Mint, DeserializeError>
source§impl Mint
impl Mint
pub fn new() -> Self
pub fn new_from_entry(key: &PolicyID, value: &MintAssets) -> Self
pub fn len(&self) -> usize
pub fn insert( &mut self, key: &PolicyID, value: &MintAssets ) -> Option<MintAssets>
sourcepub fn get(&self, key: &PolicyID) -> Option<MintAssets>
👎Deprecated since 11.2.0: Mint can store multiple entries for the same policy id. Use .get_all
instead.
pub fn get(&self, key: &PolicyID) -> Option<MintAssets>
.get_all
instead.!!! DEPRECATED !!!
Mint can store multiple entries for the same policy id.
Use .get_all
instead.
pub fn get_all(&self, key: &PolicyID) -> Option<MintsAssets>
pub fn keys(&self) -> PolicyIDs
sourcepub fn as_positive_multiasset(&self) -> MultiAsset
pub fn as_positive_multiasset(&self) -> MultiAsset
Returns the multiasset where only positive (minting) entries are present
sourcepub fn as_negative_multiasset(&self) -> MultiAsset
pub fn as_negative_multiasset(&self) -> MultiAsset
Returns the multiasset where only negative (burning) entries are present
Trait Implementations§
source§impl<'de> Deserialize<'de> for Mint
impl<'de> Deserialize<'de> for Mint
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Deserialize for Mint
impl Deserialize for Mint
fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R> ) -> Result<Self, DeserializeError>
source§impl JsonSchema for Mint
impl JsonSchema for Mint
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl Ord for Mint
impl Ord for Mint
source§impl PartialEq<Mint> for Mint
impl PartialEq<Mint> for Mint
source§impl PartialOrd<Mint> for Mint
impl PartialOrd<Mint> for Mint
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