Type Alias polymesh_api_client::basic_types::GenericAddress
source · pub type GenericAddress = MultiAddress<AccountId, u32>;
Aliased Type§
enum GenericAddress {
Id(AccountId),
Index(u32),
Raw(Vec<u8, Global>),
Address32([u8; 32]),
Address20([u8; 20]),
}
Variants§
Id(AccountId)
It’s an account ID (pubkey).
Index(u32)
It’s an account index.
Raw(Vec<u8, Global>)
It’s some arbitrary raw bytes.
Address32([u8; 32])
It’s a 32 byte representation.
Address20([u8; 20])
Its a 20 byte representation.
Trait Implementations§
source§impl<AccountId: Clone, AccountIndex: Clone> Clone for MultiAddress<AccountId, AccountIndex>
impl<AccountId: Clone, AccountIndex: Clone> 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> 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: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy ) -> Result<Self, Error>
Attempt to deserialise the value from input.
source§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
source§impl<'de, AccountId, AccountIndex> Deserialize<'de> for MultiAddress<AccountId, AccountIndex>where
AccountId: Deserialize<'de>,
AccountIndex: Deserialize<'de>,
impl<'de, AccountId, AccountIndex> Deserialize<'de> for MultiAddress<AccountId, AccountIndex>where AccountId: Deserialize<'de>, AccountIndex: Deserialize<'de>,
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<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: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
source§fn using_encoded<R, F>(&self, f: F) -> Rwhere
F: FnOnce(&[u8]) -> R,
fn using_encoded<R, F>(&self, f: F) -> Rwhere F: FnOnce(&[u8]) -> R,
Convert self to a slice and then invoke the given closure with it.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl<AccountId: Clone, AccountIndex> From<&AccountId> for MultiAddress<AccountId, AccountIndex>
impl<AccountId: Clone, AccountIndex> From<&AccountId> for MultiAddress<AccountId, AccountIndex>
source§fn from(other: &AccountId) -> Self
fn from(other: &AccountId) -> Self
Converts to this type from the input type.
source§impl<AccountId: Clone, AccountIndex: Clone> From<&MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
impl<AccountId: Clone, AccountIndex: Clone> From<&MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
source§fn from(other: &MultiAddress<AccountId, AccountIndex>) -> Self
fn from(other: &MultiAddress<AccountId, AccountIndex>) -> Self
Converts to this type from the input type.
source§impl<AccountId, AccountIndex> From<AccountId> for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> From<AccountId> for MultiAddress<AccountId, AccountIndex>
source§impl<AccountIndex> From<AccountId32> for MultiAddress<AccountId, AccountIndex>
impl<AccountIndex> From<AccountId32> for MultiAddress<AccountId, AccountIndex>
source§fn from(other: AccountId32) -> Self
fn from(other: AccountId32) -> Self
Converts to this type from the input type.
source§impl<AccountId, AccountIndex> From<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
impl<AccountId, AccountIndex> From<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
source§fn from(other: MultiAddress<AccountId, AccountIndex>) -> Self
fn from(other: MultiAddress<AccountId, AccountIndex>) -> Self
Converts to this type from the input type.
source§impl<AccountId: Ord, AccountIndex: Ord> Ord for MultiAddress<AccountId, AccountIndex>
impl<AccountId: Ord, AccountIndex: Ord> Ord for MultiAddress<AccountId, AccountIndex>
source§fn cmp(&self, other: &MultiAddress<AccountId, AccountIndex>) -> Ordering
fn cmp(&self, other: &MultiAddress<AccountId, AccountIndex>) -> Ordering
1.21.0 · 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
source§impl<AccountId: PartialEq, AccountIndex: PartialEq> PartialEq<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
impl<AccountId: PartialEq, AccountIndex: PartialEq> PartialEq<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
source§fn eq(&self, other: &MultiAddress<AccountId, AccountIndex>) -> bool
fn eq(&self, other: &MultiAddress<AccountId, AccountIndex>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<AccountId: PartialOrd, AccountIndex: PartialOrd> PartialOrd<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
impl<AccountId: PartialOrd, AccountIndex: PartialOrd> PartialOrd<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>
source§fn partial_cmp(
&self,
other: &MultiAddress<AccountId, AccountIndex>
) -> Option<Ordering>
fn partial_cmp( &self, other: &MultiAddress<AccountId, AccountIndex> ) -> Option<Ordering>
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 more