pub struct Supply { /* private fields */ }
Expand description
Structure providing extended information about the asset supply, derived from the known/available contract data.
Structure fields are immutable since they are bound with client-side-validation commitments and can’t be changed.
Implementations
sourceimpl Supply
impl Supply
sourcepub fn known_circulating(&self) -> &AtomicValue
pub fn known_circulating(&self) -> &AtomicValue
Method borrowing Supply::known_circulating
field.
Sum of all already issued amounts which are known from the stash
sourcepub fn is_known(&self) -> &Option<bool>
pub fn is_known(&self) -> &Option<bool>
Method borrowing Supply::is_known
field.
Specifies if all supply-changing operations are known.
sourcepub fn issue_limit(&self) -> &AtomicValue
pub fn issue_limit(&self) -> &AtomicValue
Method borrowing Supply::issue_limit
field.
Maximum total supply that might be issued
sourceimpl Supply
impl Supply
sourcepub fn total_circulating(&self) -> Option<AtomicValue>
pub fn total_circulating(&self) -> Option<AtomicValue>
Return precise supply data, if known, equal to the known circulating
supply, or if some of the supply-related operations are unknown,
None
value
Trait Implementations
sourceimpl Ord for Supply
impl Ord for Supply
sourceimpl PartialOrd<Supply> for Supply
impl PartialOrd<Supply> for Supply
sourcefn partial_cmp(&self, other: &Supply) -> Option<Ordering>
fn partial_cmp(&self, other: &Supply) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
sourceimpl StrictDecode for Supply
impl StrictDecode for Supply
sourcefn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given std::io::Read
instance; must either
construct an instance or return implementation-specific error type. Read more
sourcefn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
Read more
sourceimpl StrictEncode for Supply
impl StrictEncode for Supply
sourcefn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type. Read more
sourcefn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using StrictEncode::strict_encode
function Read more
impl Copy for Supply
impl Eq for Supply
impl StructuralEq for Supply
impl StructuralPartialEq for Supply
Auto Trait Implementations
impl RefUnwindSafe for Supply
impl Send for Supply
impl Sync for Supply
impl Unpin for Supply
impl UnwindSafe for Supply
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.