referrerpolicy=no-referrer-when-downgrade
parachain_template_runtime

Type Alias Address

Source
pub type Address = MultiAddress<AccountId, ()>;
Expand description

The address format for describing accounts.

Aliased Type§

enum Address {
    Id(AccountId32),
    Index(()),
    Raw(Vec<u8>),
    Address32([u8; 32]),
    Address20([u8; 20]),
}

Variants§

§

Id(AccountId32)

It’s an account ID (pubkey).

§

Index(())

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>
where AccountId: Clone, AccountIndex: Clone,

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, AccountIndex> Debug for MultiAddress<AccountId, AccountIndex>
where AccountId: Debug, AccountIndex: Debug,

Source§

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

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

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,

Attempt to deserialise the value from 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,

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

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>
where AccountId: Debug, AccountIndex: Debug,

Source§

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

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

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

Source§

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,

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

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

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

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

Source§

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

Converts to this type from the input type.
Source§

impl<AccountId, AccountIndex> Hash for MultiAddress<AccountId, AccountIndex>
where AccountId: Hash, AccountIndex: Hash,

Source§

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

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, AccountIndex> PartialEq for MultiAddress<AccountId, AccountIndex>
where AccountId: PartialEq, AccountIndex: PartialEq,

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

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

Source§

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> DecodeWithMemTracking for MultiAddress<AccountId, AccountIndex>
where AccountId: DecodeWithMemTracking, AccountIndex: HasCompact, <AccountIndex as HasCompact>::Type: DecodeWithMemTracking,

Source§

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

Source§

impl<AccountId, AccountIndex> Eq for MultiAddress<AccountId, AccountIndex>
where AccountId: Eq, AccountIndex: Eq,

Source§

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