pub struct ContractId(/* private fields */);
Expand description
Unique contract identifier equivalent to the contract genesis commitment
Implementations§
Source§impl ContractId
impl ContractId
pub fn copy_from_slice( slice: impl AsRef<[u8]>, ) -> Result<ContractId, FromSliceError>
Methods from Deref<Target = Array<u8, 32>>§
Trait Implementations§
Source§impl Borrow<[u8]> for ContractId
impl Borrow<[u8]> for ContractId
Source§impl Clone for ContractId
impl Clone for ContractId
Source§fn clone(&self) -> ContractId
fn clone(&self) -> ContractId
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 ContractId
impl Debug for ContractId
Source§impl Deref for ContractId
impl Deref for ContractId
Source§impl<'de> Deserialize<'de> for ContractId
impl<'de> Deserialize<'de> for ContractId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<ContractId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<ContractId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ContractId
impl Display for ContractId
Source§impl DisplayBaid64 for ContractId
impl DisplayBaid64 for ContractId
const HRI: &'static str = "rgb"
const CHUNKING: bool = true
const PREFIX: bool = true
const EMBED_CHECKSUM: bool = false
const MNEMONIC: bool = false
fn to_baid64_payload(&self) -> [u8; 32]
const CHUNK_FIRST: usize = 8usize
const CHUNK_LEN: usize = 7usize
fn to_baid64_string(&self) -> String
fn to_baid64_mnemonic(&self) -> String
fn display_baid64(&self) -> Baid64Display<LEN>
fn fmt_baid64(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§impl From<ProtocolId> for ContractId
impl From<ProtocolId> for ContractId
Source§fn from(id: ProtocolId) -> ContractId
fn from(id: ProtocolId) -> ContractId
Converts to this type from the input type.
Source§impl FromBaid64Str for ContractId
impl FromBaid64Str for ContractId
fn from_baid64_str(s: &str) -> Result<Self, Baid64ParseError>
Source§impl FromHex for ContractId
impl FromHex for ContractId
Source§fn from_byte_iter<I>(iter: I) -> Result<ContractId, Error>
fn from_byte_iter<I>(iter: I) -> Result<ContractId, Error>
Produce an object from a byte iterator
Source§impl FromStr for ContractId
impl FromStr for ContractId
Source§type Err = Baid64ParseError
type Err = Baid64ParseError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<ContractId, <ContractId as FromStr>::Err>
fn from_str(s: &str) -> Result<ContractId, <ContractId as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreSource§impl Hash for ContractId
impl Hash for ContractId
Source§impl Index<RangeFull> for ContractId
impl Index<RangeFull> for ContractId
Source§impl Index<RangeInclusive<usize>> for ContractId
impl Index<RangeInclusive<usize>> for ContractId
Source§type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
The returned type after indexing.
Source§fn index(
&self,
index: RangeInclusive<usize>,
) -> &<ContractId as Index<RangeInclusive<usize>>>::Output
fn index( &self, index: RangeInclusive<usize>, ) -> &<ContractId as Index<RangeInclusive<usize>>>::Output
Performs the indexing (
container[index]
) operation. Read moreSource§impl Index<RangeToInclusive<usize>> for ContractId
impl Index<RangeToInclusive<usize>> for ContractId
Source§type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
The returned type after indexing.
Source§fn index(
&self,
index: RangeToInclusive<usize>,
) -> &<ContractId as Index<RangeToInclusive<usize>>>::Output
fn index( &self, index: RangeToInclusive<usize>, ) -> &<ContractId as Index<RangeToInclusive<usize>>>::Output
Performs the indexing (
container[index]
) operation. Read moreSource§impl Index<usize> for ContractId
impl Index<usize> for ContractId
Source§impl LowerHex for ContractId
impl LowerHex for ContractId
Source§impl Ord for ContractId
impl Ord for ContractId
Source§fn cmp(&self, other: &ContractId) -> Ordering
fn cmp(&self, other: &ContractId) -> 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<ContractId> for OpId
impl PartialEq<ContractId> for OpId
Source§impl PartialEq<OpId> for ContractId
impl PartialEq<OpId> for ContractId
Source§impl PartialEq for ContractId
impl PartialEq for ContractId
Source§impl PartialOrd for ContractId
impl PartialOrd for ContractId
Source§impl Serialize for ContractId
impl Serialize for ContractId
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl StrictDecode for ContractId
impl StrictDecode for ContractId
fn strict_decode(reader: &mut impl TypedRead) -> Result<ContractId, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for ContractId
impl StrictDumb for ContractId
fn strict_dumb() -> ContractId
Source§impl StrictEncode for ContractId
impl StrictEncode for ContractId
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for ContractId
impl StrictTuple for ContractId
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for ContractId
impl StrictType for ContractId
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_COMMIT
fn strict_name() -> Option<TypeName>
Source§impl UpperHex for ContractId
impl UpperHex for ContractId
Source§impl Wrapper for ContractId
impl Wrapper for ContractId
Source§fn from_inner(inner: <ContractId as Wrapper>::Inner) -> ContractId
fn from_inner(inner: <ContractId as Wrapper>::Inner) -> ContractId
Instantiates wrapper type with the inner data
Source§fn as_inner(&self) -> &<ContractId as Wrapper>::Inner
fn as_inner(&self) -> &<ContractId as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
Source§fn into_inner(self) -> <ContractId as Wrapper>::Inner
fn into_inner(self) -> <ContractId as Wrapper>::Inner
Unwraps the wrapper returning the inner type
impl Copy for ContractId
impl Eq for ContractId
impl StrictProduct for ContractId
impl StructuralPartialEq for ContractId
Auto Trait Implementations§
impl Freeze for ContractId
impl RefUnwindSafe for ContractId
impl Send for ContractId
impl Sync for ContractId
impl Unpin for ContractId
impl UnwindSafe for ContractId
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<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Id
impl<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Id
Source§fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
Constructs a wrapper type around a byte array.
Source§fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
Constructs a byte array from the slice. Errors if the slice length
doesn’t match
LEN
constant generic.Source§fn from_slice_unsafe(slice: impl AsRef<[u8]>) -> Id
fn from_slice_unsafe(slice: impl AsRef<[u8]>) -> Id
Constructs a byte array from the slice. Expects the slice length
doesn’t match
LEN
constant generic. Read moreSource§fn to_byte_array(&self) -> [u8; LEN]
fn to_byte_array(&self) -> [u8; LEN]
Returns a byte array representation stored in the wrapped type.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.