pub struct AccountId { /* private fields */ }
Expand description
Unique identifier for an account. On each chain this is unique.
Implementations§
Source§impl AccountId
impl AccountId
pub fn new( seq: AccountSequence, trace: AccountTrace, ) -> Result<Self, AbstractError>
pub fn local(seq: AccountSequence) -> Self
pub fn remote( seq: AccountSequence, trace: Vec<ChainName>, ) -> Result<Self, AbstractError>
Sourcepub const fn const_new(seq: AccountSequence, trace: AccountTrace) -> Self
pub const fn const_new(seq: AccountSequence, trace: AccountTrace) -> Self
Does not verify input. Used internally for testing
pub fn seq(&self) -> AccountSequence
pub fn trace(&self) -> &AccountTrace
pub fn trace_mut(&mut self) -> &mut AccountTrace
pub fn is_local(&self) -> bool
pub fn is_remote(&self) -> bool
pub fn decompose(self) -> (AccountTrace, AccountSequence)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AccountId
impl<'de> Deserialize<'de> for AccountId
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> IndexList<AccountId> for NamespaceIndexes<'a>
impl<'a> IndexList<AccountId> for NamespaceIndexes<'a>
Source§impl JsonSchema for AccountId
impl JsonSchema for AccountId
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreSource§impl KeyDeserialize for &AccountId
impl KeyDeserialize for &AccountId
Source§impl KeyDeserialize for AccountId
impl KeyDeserialize for AccountId
Source§impl<'a> PrimaryKey<'a> for AccountId
impl<'a> PrimaryKey<'a> for AccountId
Source§type Prefix = AccountTrace
type Prefix = AccountTrace
These associated types need to implement
Prefixer
, so that they can be useful arguments
for prefix()
, sub_prefix()
, and their key-deserializable variants.type SubPrefix = ()
Source§type Suffix = u32
type Suffix = u32
These associated types need to implement
KeyDeserialize
, so that they can be returned from
range_de()
and friends.type SuperSuffix = AccountId
fn joined_key(&self) -> Vec<u8> ⓘ
fn joined_extra_key(&self, key: &[u8]) -> Vec<u8> ⓘ
impl StructuralPartialEq for AccountId
Auto Trait Implementations§
impl Freeze for AccountId
impl RefUnwindSafe for AccountId
impl Send for AccountId
impl Sync for AccountId
impl Unpin for AccountId
impl UnwindSafe for AccountId
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