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 + AccountTraits, AccountIndex: Clone + AccountTraits> Clone for MultiAddress<AccountId, AccountIndex>

source§

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)

Performs copy-assignment from source. Read more
source§

impl<AccountId: Debug + AccountTraits, AccountIndex: Debug + AccountTraits> Debug for MultiAddress<AccountId, AccountIndex>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<AccountId, AccountIndex> Decode for MultiAddress<AccountId, AccountIndex>where AccountId: Decode + AccountTraits, AccountIndex: HasCompact + AccountTraits,

source§

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,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§

fn skip<I>(input: &mut I) -> Result<(), Error>where I: Input,

Attempt to skip the encoded value from input. Read more
source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
source§

impl<'de, AccountId, AccountIndex> Deserialize<'de> for MultiAddress<AccountId, AccountIndex>where AccountId: AccountTraits, AccountIndex: AccountTraits,

source§

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 + AccountTraits, AccountIndex: HasCompact + AccountTraits,

source§

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 )

Convert self to a slice and append it to the destination.
source§

fn encode(&self) -> Vec<u8, Global>

Convert self to an owned vector.
source§

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

Calculates the encoded size. Read more
source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> From<&AccountId> for MultiAddress<AccountId, AccountIndex>

source§

fn from(other: &AccountId) -> Self

Converts to this type from the input type.
source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> From<&MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>

source§

fn from(other: &MultiAddress<AccountId, AccountIndex>) -> Self

Converts to this type from the input type.
source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> From<AccountId> for MultiAddress<AccountId, AccountIndex>

source§

fn from(other: AccountId) -> Self

Converts to this type from the input type.
source§

impl<AccountIndex: AccountTraits> From<AccountId32> for MultiAddress<AccountId, AccountIndex>

source§

fn from(other: AccountId32) -> Self

Converts to this type from the input type.
source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> From<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>

source§

fn from(other: MultiAddress<AccountId, AccountIndex>) -> Self

Converts to this type from the input type.
source§

impl<AccountId: Hash + AccountTraits, AccountIndex: Hash + AccountTraits> Hash for MultiAddress<AccountId, AccountIndex>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<AccountId: Ord + AccountTraits, AccountIndex: Ord + AccountTraits> Ord for MultiAddress<AccountId, AccountIndex>

source§

fn cmp(&self, other: &MultiAddress<AccountId, AccountIndex>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl<AccountId: PartialEq + AccountTraits, AccountIndex: PartialEq + AccountTraits> PartialEq<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>

source§

fn eq(&self, other: &MultiAddress<AccountId, AccountIndex>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<AccountId: PartialOrd + AccountTraits, AccountIndex: PartialOrd + AccountTraits> PartialOrd<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>

source§

fn partial_cmp( &self, other: &MultiAddress<AccountId, AccountIndex> ) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<AccountId, AccountIndex> Serialize for MultiAddress<AccountId, AccountIndex>where AccountId: AccountTraits, AccountIndex: AccountTraits,

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<AccountId, AccountIndex> TypeInfo for MultiAddress<AccountId, AccountIndex>where AccountId: TypeInfo + 'static + AccountTraits, AccountIndex: HasCompact + AccountTraits + TypeInfo + 'static,

§

type Identity = MultiAddress<AccountId, AccountIndex>

The type identifying for which type info is provided. Read more
source§

fn type_info() -> Type

Returns the static type identifier for Self.
source§

impl<AccountId, AccountIndex> EncodeLike<MultiAddress<AccountId, AccountIndex>> for MultiAddress<AccountId, AccountIndex>where AccountId: Encode + AccountTraits, AccountIndex: HasCompact + AccountTraits,

source§

impl<AccountId: Eq + AccountTraits, AccountIndex: Eq + AccountTraits> Eq for MultiAddress<AccountId, AccountIndex>

source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> StructuralEq for MultiAddress<AccountId, AccountIndex>

source§

impl<AccountId: AccountTraits, AccountIndex: AccountTraits> StructuralPartialEq for MultiAddress<AccountId, AccountIndex>