Struct hedera::DelegateContractId
source · pub struct DelegateContractId {
pub shard: u64,
pub realm: u64,
pub num: u64,
pub checksum: Option<Checksum>,
pub evm_address: Option<[u8; 20]>,
}
Expand description
A unique identifier for a smart contract on Hedera.
Fields§
§shard: u64
A non-negative number identifying the shard containing this contract instance.
realm: u64
A non-negative number identifying the realm within the shard containing this contract instance.
num: u64
A non-negative number identifying the entity within the realm containing this contract instance.
Note: Exactly one of evm_address
and num
must exist.
checksum: Option<Checksum>
A checksum if the contract ID was read from a user inputted string which inclueded a checksum
evm_address: Option<[u8; 20]>
EVM address identifying the entity within the realm containing this contract instance.
Note: Exactly one of evm_address
and num
must exist.
Implementations§
source§impl DelegateContractId
impl DelegateContractId
sourcepub fn new(shard: u64, realm: u64, num: u64) -> Self
pub fn new(shard: u64, realm: u64, num: u64) -> Self
Create a DelegateContractId
from the given shard/realm/num
sourcepub fn from_solidity_address(address: &str) -> Result<Self>
pub fn from_solidity_address(address: &str) -> Result<Self>
Create a DelegateContractId
from a solidity address.
§Errors
Error::BasicParse
ifaddress
cannot be parsed as a solidity address.
Trait Implementations§
source§impl Clone for DelegateContractId
impl Clone for DelegateContractId
source§fn clone(&self) -> DelegateContractId
fn clone(&self) -> DelegateContractId
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 DelegateContractId
impl Debug for DelegateContractId
source§impl Display for DelegateContractId
impl Display for DelegateContractId
source§impl From<EntityId> for DelegateContractId
impl From<EntityId> for DelegateContractId
source§impl From<u64> for DelegateContractId
impl From<u64> for DelegateContractId
source§impl FromStr for DelegateContractId
impl FromStr for DelegateContractId
source§impl Hash for DelegateContractId
impl Hash for DelegateContractId
source§impl PartialEq for DelegateContractId
impl PartialEq for DelegateContractId
source§fn eq(&self, other: &DelegateContractId) -> bool
fn eq(&self, other: &DelegateContractId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for DelegateContractId
impl Eq for DelegateContractId
impl StructuralPartialEq for DelegateContractId
Auto Trait Implementations§
impl Freeze for DelegateContractId
impl RefUnwindSafe for DelegateContractId
impl Send for DelegateContractId
impl Sync for DelegateContractId
impl Unpin for DelegateContractId
impl UnwindSafe for DelegateContractId
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<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.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.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request