Struct coreledger_backend::types::ContractId
pub struct ContractId(/* private fields */);
Expand description
Represents a unique identifier of a contract.
Is de-/serialized as 20-bytes-long unsigned big integer value, e.g.:
0xA5A31D5493A3728027050D5CFAFF0BAB48205B84
945_621_053_689_550_037_592_822_196_386_316_171_748_592_081_796
Implementations§
§impl ContractId
impl ContractId
pub fn new(value: BigUint) -> Self
pub fn pseudo_random() -> Self
Trait Implementations§
§impl Clone for ContractId
impl Clone for ContractId
§fn clone(&self) -> ContractId
fn clone(&self) -> ContractId
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 more§impl Debug for ContractId
impl Debug for ContractId
§impl<'de> Deserialize<'de> for ContractId
impl<'de> Deserialize<'de> for ContractId
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl From<&ContractId> for Nat
impl From<&ContractId> for Nat
§fn from(value: &ContractId) -> Self
fn from(value: &ContractId) -> Self
Converts to this type from the input type.
§impl From<BigUint> for ContractId
impl From<BigUint> for ContractId
§impl From<ContractId> for BigUint
impl From<ContractId> for BigUint
§fn from(value: ContractId) -> Self
fn from(value: ContractId) -> Self
Converts to this type from the input type.
§impl From<ContractId> for Nat
impl From<ContractId> for Nat
§fn from(value: ContractId) -> Self
fn from(value: ContractId) -> Self
Converts to this type from the input type.
§impl From<Nat> for ContractId
impl From<Nat> for ContractId
§impl From<TxId> for ContractId
impl From<TxId> for ContractId
§impl Ord for ContractId
impl Ord for ContractId
§impl PartialEq for ContractId
impl PartialEq for ContractId
§fn eq(&self, other: &ContractId) -> bool
fn eq(&self, other: &ContractId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for ContractId
impl PartialOrd for ContractId
§fn partial_cmp(&self, other: &ContractId) -> Option<Ordering>
fn partial_cmp(&self, other: &ContractId) -> 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 more§impl Serialize for ContractId
impl Serialize for ContractId
impl Eq 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