Struct cardano_serialization_lib::Mint 
source · pub struct Mint(/* private fields */);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 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 schema_id() -> Cow<'static, str>
 
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. 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 NoneOrEmpty for Mint
 
impl NoneOrEmpty for Mint
fn is_none_or_empty(&self) -> bool
source§impl Ord for Mint
 
impl Ord for Mint
source§impl PartialEq for Mint
 
impl PartialEq for Mint
source§impl PartialOrd for Mint
 
impl PartialOrd 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 moresource§impl Serialize for Mint
 
impl Serialize for Mint
fn serialize<'se, W: Write>( &self, serializer: &'se mut Serializer<W> ) -> Result<&'se mut Serializer<W>>
impl Eq for Mint
impl StructuralEq for Mint
impl StructuralPartialEq for Mint
Auto Trait Implementations§
impl RefUnwindSafe for Mint
impl Send for Mint
impl Sync for Mint
impl Unpin for Mint
impl UnwindSafe for Mint
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