pub struct SubAccountIdentifier {
pub address: String,
pub metadata: Option<Value>,
}
Expand description
SubAccountIdentifier : An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.
Fields§
§address: String
The SubAccount address may be a cryptographic value or some other identifier (ex: bonded) that uniquely specifies a SubAccount.
metadata: Option<Value>
If the SubAccount address is not sufficient to uniquely specify a SubAccount, any other identifying information can be stored here. It is important to note that two SubAccounts with identical addresses but differing metadata will not be considered equal by clients.
Implementations§
source§impl SubAccountIdentifier
impl SubAccountIdentifier
sourcepub fn new(address: String) -> SubAccountIdentifier
pub fn new(address: String) -> SubAccountIdentifier
An account may have state specific to a contract address (ERC-20 token) and/or a stake (delegated balance). The sub_account_identifier should specify which state (if applicable) an account instantiation refers to.
Trait Implementations§
source§impl Clone for SubAccountIdentifier
impl Clone for SubAccountIdentifier
source§fn clone(&self) -> SubAccountIdentifier
fn clone(&self) -> SubAccountIdentifier
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SubAccountIdentifier
impl Debug for SubAccountIdentifier
source§impl Default for SubAccountIdentifier
impl Default for SubAccountIdentifier
source§fn default() -> SubAccountIdentifier
fn default() -> SubAccountIdentifier
source§impl<'de> Deserialize<'de> for SubAccountIdentifier
impl<'de> Deserialize<'de> for SubAccountIdentifier
source§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>,
source§impl PartialEq<SubAccountIdentifier> for SubAccountIdentifier
impl PartialEq<SubAccountIdentifier> for SubAccountIdentifier
source§fn eq(&self, other: &SubAccountIdentifier) -> bool
fn eq(&self, other: &SubAccountIdentifier) -> bool
self
and other
values to be equal, and is used
by ==
.