pub struct InfoCellData {
pub version: u8,
pub current_supply: u128,
pub max_supply: u128,
pub sudt_script_hash: H256,
pub other_data: Vec<u8>,
}Expand description
The info cell internal data of the supply mode.
Fields§
§version: u8Current the version is 0, 1 byute
current_supply: u128Only the current supply field can be updated during the transactions.16 bytes, little endian number
max_supply: u128The max supply limit.16 bytes, little endian number
sudt_script_hash: H256Type script hash. 32 bytes, sUDT type script hash
other_data: Vec<u8>Other data of variable length
Implementations§
Source§impl InfoCellData
impl InfoCellData
Sourcepub fn new_simple(
current_supply: u128,
max_supply: u128,
sudt_script_hash: H256,
) -> Self
pub fn new_simple( current_supply: u128, max_supply: u128, sudt_script_hash: H256, ) -> Self
Create an InfoCellData with must exist fields.
§Arguments
current_supplyThe current supply valuemax_supplyThe max supply value.sudt_script_hashThe type script hash
Trait Implementations§
Source§impl Clone for InfoCellData
impl Clone for InfoCellData
Source§fn clone(&self) -> InfoCellData
fn clone(&self) -> InfoCellData
Returns a duplicate 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 InfoCellData
impl Debug for InfoCellData
Source§impl Hash for InfoCellData
impl Hash for InfoCellData
Source§impl PartialEq for InfoCellData
impl PartialEq for InfoCellData
impl Eq for InfoCellData
impl StructuralPartialEq for InfoCellData
Auto Trait Implementations§
impl Freeze for InfoCellData
impl RefUnwindSafe for InfoCellData
impl Send for InfoCellData
impl Sync for InfoCellData
impl Unpin for InfoCellData
impl UnwindSafe for InfoCellData
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> CallHasher for T
impl<T> CallHasher for T
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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