Struct tapyrus::blockdata::script::ColorIdentifier
source · pub struct ColorIdentifier {
pub token_type: TokenTypes,
/* private fields */
}
Expand description
ColorIdentifier
Fields§
§token_type: TokenTypes
Token type
Implementations§
source§impl ColorIdentifier
impl ColorIdentifier
sourcepub fn reissuable(script_pubkey: Script) -> Self
pub fn reissuable(script_pubkey: Script) -> Self
initialize ColorIdentifier with type Reissuable
sourcepub fn non_reissuable(out_point: OutPoint) -> Self
pub fn non_reissuable(out_point: OutPoint) -> Self
initialize ColorIdentifier with type Non Reissuable
sourcepub fn is_colored(&self) -> bool
pub fn is_colored(&self) -> bool
return true if this is colored coin
sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
return true if this is uncolored coin(TPC)
sourcepub fn from_slice(data: &[u8]) -> Result<Self, Error>
pub fn from_slice(data: &[u8]) -> Result<Self, Error>
Initialize ColorIdentifier from slice
Trait Implementations§
source§impl Clone for ColorIdentifier
impl Clone for ColorIdentifier
source§fn clone(&self) -> ColorIdentifier
fn clone(&self) -> ColorIdentifier
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 ColorIdentifier
impl Debug for ColorIdentifier
source§impl Decodable for ColorIdentifier
impl Decodable for ColorIdentifier
source§impl Default for ColorIdentifier
impl Default for ColorIdentifier
source§impl Display for ColorIdentifier
impl Display for ColorIdentifier
source§impl Encodable for ColorIdentifier
impl Encodable for ColorIdentifier
source§impl Hash for ColorIdentifier
impl Hash for ColorIdentifier
source§impl Ord for ColorIdentifier
impl Ord for ColorIdentifier
source§fn cmp(&self, other: &ColorIdentifier) -> Ordering
fn cmp(&self, other: &ColorIdentifier) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ColorIdentifier
impl PartialEq for ColorIdentifier
source§fn eq(&self, other: &ColorIdentifier) -> bool
fn eq(&self, other: &ColorIdentifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ColorIdentifier
impl PartialOrd for ColorIdentifier
source§fn partial_cmp(&self, other: &ColorIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &ColorIdentifier) -> Option<Ordering>
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 moreimpl Eq for ColorIdentifier
impl StructuralEq for ColorIdentifier
impl StructuralPartialEq for ColorIdentifier
Auto Trait Implementations§
impl RefUnwindSafe for ColorIdentifier
impl Send for ColorIdentifier
impl Sync for ColorIdentifier
impl Unpin for ColorIdentifier
impl UnwindSafe for ColorIdentifier
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.