Struct chain_impl_mockchain::tokens::minting_policy::MintingPolicy
source · pub struct MintingPolicy(Vec<MintingPolicyEntry>);
Expand description
A minting policy consists of multiple entries defining different constraints on the minting process. An empty policy means that new tokens cannot be minted during the chain run.
Minting policies are meant to be ignored in block0 fragments.
Tuple Fields§
§0: Vec<MintingPolicyEntry>
Implementations§
source§impl MintingPolicy
impl MintingPolicy
pub fn new() -> Self
pub fn check_minting_tx(&self) -> Result<(), MintingPolicyViolation>
pub fn entries(&self) -> &[MintingPolicyEntry]
pub fn bytes(&self) -> Vec<u8> ⓘ
pub fn hash(&self) -> PolicyHash
Trait Implementations§
source§impl Arbitrary for MintingPolicy
impl Arbitrary for MintingPolicy
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<MintingPolicy>
type Strategy = BoxedStrategy<MintingPolicy>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl Arbitrary for MintingPolicy
impl Arbitrary for MintingPolicy
source§impl Clone for MintingPolicy
impl Clone for MintingPolicy
source§fn clone(&self) -> MintingPolicy
fn clone(&self) -> MintingPolicy
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 MintingPolicy
impl Debug for MintingPolicy
source§impl Default for MintingPolicy
impl Default for MintingPolicy
source§impl Deserialize for MintingPolicy
impl Deserialize for MintingPolicy
fn deserialize<R: Read>(codec: &mut Codec<R>) -> Result<Self, ReadError>
fn deserialize_validate<R>(codec: &mut Codec<R>) -> Result<(), ReadError>where R: Read,
source§impl PartialEq<MintingPolicy> for MintingPolicy
impl PartialEq<MintingPolicy> for MintingPolicy
source§fn eq(&self, other: &MintingPolicy) -> bool
fn eq(&self, other: &MintingPolicy) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for MintingPolicy
impl Serialize for MintingPolicy
impl Eq for MintingPolicy
impl StructuralEq for MintingPolicy
impl StructuralPartialEq for MintingPolicy
Auto Trait Implementations§
impl RefUnwindSafe for MintingPolicy
impl Send for MintingPolicy
impl Sync for MintingPolicy
impl Unpin for MintingPolicy
impl UnwindSafe for MintingPolicy
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