pub struct AssetId(_);Expand description
An issued asset ID.
Implementations
sourceimpl AssetId
impl AssetId
sourcepub fn from_inner(midstate: Midstate) -> AssetId
pub fn from_inner(midstate: Midstate) -> AssetId
Create an AssetId from its inner type.
sourcepub fn into_inner(self) -> Midstate
pub fn into_inner(self) -> Midstate
Convert the AssetId into its inner type.
sourcepub fn from_slice(sl: &[u8]) -> Result<AssetId, Error>
pub fn from_slice(sl: &[u8]) -> Result<AssetId, Error>
Copies a byte slice into an AssetId object
sourcepub fn generate_asset_entropy(
prevout: OutPoint,
contract_hash: ContractHash
) -> Midstate
pub fn generate_asset_entropy(
prevout: OutPoint,
contract_hash: ContractHash
) -> Midstate
Generate the asset entropy from the issuance prevout and the contract hash.
sourcepub fn from_entropy(entropy: Midstate) -> AssetId
pub fn from_entropy(entropy: Midstate) -> AssetId
Calculate the asset ID from the asset entropy.
sourcepub fn reissuance_token_from_entropy(
entropy: Midstate,
confidential: bool
) -> AssetId
pub fn reissuance_token_from_entropy(
entropy: Midstate,
confidential: bool
) -> AssetId
Calculate the reissuance token asset ID from the asset entropy.
Trait Implementations
sourceimpl Decodable for AssetId
impl Decodable for AssetId
sourcefn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
fn consensus_decode<D: Read>(d: D) -> Result<Self, Error>
Decode an object with a well-defined format
sourceimpl Deserialize for AssetId
impl Deserialize for AssetId
sourcefn deserialize(bytes: &[u8]) -> Result<Self, Error>
fn deserialize(bytes: &[u8]) -> Result<Self, Error>
Deserialize a value from raw data.
sourceimpl FromHex for AssetId
impl FromHex for AssetId
sourcefn from_byte_iter<I>(iter: I) -> Result<Self, Error> where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_byte_iter<I>(iter: I) -> Result<Self, Error> where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
Produce an object from a byte iterator
sourceimpl Ord for AssetId
impl Ord for AssetId
sourceimpl PartialOrd<AssetId> for AssetId
impl PartialOrd<AssetId> for AssetId
sourcefn partial_cmp(&self, other: &AssetId) -> Option<Ordering>
fn partial_cmp(&self, other: &AssetId) -> 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
impl Copy for AssetId
impl Eq for AssetId
impl StructuralEq for AssetId
impl StructuralPartialEq for AssetId
Auto Trait Implementations
impl RefUnwindSafe for AssetId
impl Send for AssetId
impl Sync for AssetId
impl Unpin for AssetId
impl UnwindSafe for AssetId
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