Enum concordium_std::Address
source · pub enum Address {
Account(AccountAddress),
Contract(ContractAddress),
}
Expand description
Either an address of an account, or contract.
Variants§
Account(AccountAddress)
Contract(ContractAddress)
Implementations§
source§impl Address
impl Address
pub fn matches_account(&self, acc: &AccountAddress) -> bool
pub fn matches_contract(&self, cnt: &ContractAddress) -> bool
sourcepub fn is_account(&self) -> bool
pub fn is_account(&self) -> bool
Return true
if and only if the address is an account address.
sourcepub fn is_contract(&self) -> bool
pub fn is_contract(&self) -> bool
Return true
if and only if the address is a contract address.
Trait Implementations§
source§impl From<AccountAddress> for Address
impl From<AccountAddress> for Address
source§fn from(address: AccountAddress) -> Address
fn from(address: AccountAddress) -> Address
Converts to this type from the input type.
source§impl From<ContractAddress> for Address
impl From<ContractAddress> for Address
source§fn from(address: ContractAddress) -> Address
fn from(address: ContractAddress) -> Address
Converts to this type from the input type.
source§impl Ord for Address
impl Ord for Address
source§impl PartialEq for Address
impl PartialEq for Address
source§impl PartialOrd for Address
impl PartialOrd for Address
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 Copy for Address
impl Eq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
impl<D, S> DeserialWithState<S> for Dwhere
D: Deserial,
S: HasStateApi,
source§fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
fn deserial_with_state<R>(_state: &S, source: &mut R) -> Result<D, ParseError>where
R: Read,
Attempt to read a structure from a given source and state, failing if
an error occurs during deserialization or reading.