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§
impl Copy for Address
impl Eq for Address
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
1.21.0 (const: unstable) · 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
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.