pub type Address = MultiAddress<AccountId, AccountIndex>;
Expand description
The address format for describing accounts.
Aliased Type§
enum Address {
Id(AccountId32),
Index(u32),
Raw(Vec<u8>),
Address32([u8; 32]),
Address20([u8; 20]),
}
Variants§
Id(AccountId32)
It’s an account ID (pubkey).
Index(u32)
It’s an account index.
Raw(Vec<u8>)
It’s some arbitrary raw bytes.
Address32([u8; 32])
It’s a 32 byte representation.
Address20([u8; 20])
It’s a 20 byte representation.
Trait Implementations
Source§impl<AccountId, AccountIndex> Clone for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> Clone for MultiAddress<AccountId, AccountIndex>
Source§fn clone(&self) -> MultiAddress<AccountId, AccountIndex>
fn clone(&self) -> MultiAddress<AccountId, AccountIndex>
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<AccountId, AccountIndex> Debug for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> Debug for MultiAddress<AccountId, AccountIndex>
Source§impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex>where
AccountId: Decode,
AccountIndex: HasCompact,
impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex>where
AccountId: Decode,
AccountIndex: HasCompact,
Source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<MultiAddress<AccountId, AccountIndex>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<MultiAddress<AccountId, AccountIndex>, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
fn skip<I>(input: &mut I) -> Result<(), Error>where
I: Input,
Attempt to skip the encoded value from input. Read more
§fn encoded_fixed_size() -> Option<usize>
fn encoded_fixed_size() -> Option<usize>
Returns the fixed encoded size of the type. Read more
Source§impl<AccountId, AccountIndex> Display for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> Display for MultiAddress<AccountId, AccountIndex>
Source§impl<AccountId, AccountIndex> Encode for MultiAddress<AccountId, AccountIndex>where
AccountId: Encode,
AccountIndex: HasCompact,
impl<AccountId, AccountIndex> Encode for MultiAddress<AccountId, AccountIndex>where
AccountId: Encode,
AccountIndex: HasCompact,
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)where
__CodecOutputEdqy: Output + ?Sized,
Convert self to a slice and append it to the destination.
§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<AccountId, AccountIndex> From<AccountId> for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> From<AccountId> for MultiAddress<AccountId, AccountIndex>
Source§fn from(a: AccountId) -> MultiAddress<AccountId, AccountIndex>
fn from(a: AccountId) -> MultiAddress<AccountId, AccountIndex>
Converts to this type from the input type.
Source§impl<AccountId, AccountIndex> Hash for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> Hash for MultiAddress<AccountId, AccountIndex>
Source§impl<AccountId, AccountIndex> PartialEq for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> PartialEq for MultiAddress<AccountId, AccountIndex>
Source§fn eq(&self, other: &MultiAddress<AccountId, AccountIndex>) -> bool
fn eq(&self, other: &MultiAddress<AccountId, AccountIndex>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.