Struct AccountId20
pub struct AccountId20(pub [u8; 20]);
Expand description
A fully Ethereum-compatible AccountId
.
Conforms to H160 address and ECDSA key standards.
Alternative to H256->H160 mapping.
Tuple Fields§
§0: [u8; 20]
Trait Implementations§
§impl AsMut<[u8]> for AccountId20
impl AsMut<[u8]> for AccountId20
§impl AsMut<[u8; 20]> for AccountId20
impl AsMut<[u8; 20]> for AccountId20
§impl AsRef<[u8]> for AccountId20
impl AsRef<[u8]> for AccountId20
§impl AsRef<[u8; 20]> for AccountId20
impl AsRef<[u8; 20]> for AccountId20
§impl Clone for AccountId20
impl Clone for AccountId20
§fn clone(&self) -> AccountId20
fn clone(&self) -> AccountId20
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 Convert<AccountId20, MultiAccountId> for AccountId20Converter
impl Convert<AccountId20, MultiAccountId> for AccountId20Converter
source§fn convert(account_id: AccountId20) -> MultiAccountId
fn convert(account_id: AccountId20) -> MultiAccountId
Make conversion.
§impl Debug for AccountId20
impl Debug for AccountId20
§impl Decode for AccountId20
impl Decode for AccountId20
§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AccountId20, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<AccountId20, 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
§impl Default for AccountId20
impl Default for AccountId20
§fn default() -> AccountId20
fn default() -> AccountId20
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for AccountId20
impl<'de> Deserialize<'de> for AccountId20
§fn deserialize<D>(
deserializer: D,
) -> Result<AccountId20, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<AccountId20, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for AccountId20
impl Display for AccountId20
§impl Encode for AccountId20
impl Encode for AccountId20
§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<__CodecOutputReturn, __CodecUsingEncodedCallback>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback>( &self, f: __CodecUsingEncodedCallback, ) -> __CodecOutputReturn
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
§impl From<[u8; 20]> for AccountId20
impl From<[u8; 20]> for AccountId20
§fn from(bytes: [u8; 20]) -> AccountId20
fn from(bytes: [u8; 20]) -> AccountId20
Converts to this type from the input type.
§impl From<[u8; 32]> for AccountId20
impl From<[u8; 32]> for AccountId20
§fn from(bytes: [u8; 32]) -> AccountId20
fn from(bytes: [u8; 32]) -> AccountId20
Converts to this type from the input type.
§impl From<AccountId20> for [u8; 20]
impl From<AccountId20> for [u8; 20]
§fn from(val: AccountId20) -> [u8; 20]
fn from(val: AccountId20) -> [u8; 20]
Converts to this type from the input type.
§impl From<AccountId32> for AccountId20
impl From<AccountId32> for AccountId20
§fn from(account: AccountId32) -> AccountId20
fn from(account: AccountId32) -> AccountId20
Converts to this type from the input type.
§impl From<CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>> for AccountId20
impl From<CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>> for AccountId20
§fn from(
pk: CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>,
) -> AccountId20
fn from( pk: CryptoBytes<sp_core::::ecdsa::Public::{constant#0}, (PublicTag, EcdsaTag)>, ) -> AccountId20
Converts to this type from the input type.
§impl From<H160> for AccountId20
impl From<H160> for AccountId20
§fn from(h160: H160) -> AccountId20
fn from(h160: H160) -> AccountId20
Converts to this type from the input type.
§impl FromStr for AccountId20
impl FromStr for AccountId20
§impl Hash for AccountId20
impl Hash for AccountId20
§impl MaxEncodedLen for AccountId20
impl MaxEncodedLen for AccountId20
§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
§impl Ord for AccountId20
impl Ord for AccountId20
§impl PartialEq for AccountId20
impl PartialEq for AccountId20
§impl PartialOrd for AccountId20
impl PartialOrd for AccountId20
§impl Serialize for AccountId20
impl Serialize for AccountId20
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryConvertBack<AccountId20, MultiAccountId> for AccountId20Converter
impl TryConvertBack<AccountId20, MultiAccountId> for AccountId20Converter
source§fn try_convert_back(multi_account_id: MultiAccountId) -> Option<AccountId20>
fn try_convert_back(multi_account_id: MultiAccountId) -> Option<AccountId20>
Make conversion back.
§impl<'a> TryFrom<&'a [u8]> for AccountId20
impl<'a> TryFrom<&'a [u8]> for AccountId20
§impl TypeInfo for AccountId20
impl TypeInfo for AccountId20
impl Copy for AccountId20
impl EncodeLike for AccountId20
impl Eq for AccountId20
impl StructuralPartialEq for AccountId20
Auto Trait Implementations§
impl Freeze for AccountId20
impl RefUnwindSafe for AccountId20
impl Send for AccountId20
impl Sync for AccountId20
impl Unpin for AccountId20
impl UnwindSafe for AccountId20
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<T, U> AsMutByteSlice<T> for U
impl<T, U> AsMutByteSlice<T> for U
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
§impl<U> AsMutSliceOf for U
impl<U> AsMutSliceOf for U
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where
T: FromByteSlice,
§impl<U> AsSliceOf for U
impl<U> AsSliceOf for U
fn as_slice_of<T>(&self) -> Result<&[T], Error>where
T: FromByteSlice,
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
§impl<T> Clear for T
impl<T> Clear for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> DecodeAll for Twhere
T: Decode,
impl<T> DecodeAll for Twhere
T: Decode,
§fn decode_all(input: &mut &[u8]) -> Result<T, Error>
fn decode_all(input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
§impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMax<T> for Twhere
T: PartialOrd,
§fn defensive_max(self, other: T) -> T
fn defensive_max(self, other: T) -> T
§fn defensive_strict_max(self, other: T) -> T
fn defensive_strict_max(self, other: T) -> T
§impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
impl<T> DefensiveMin<T> for Twhere
T: PartialOrd,
§fn defensive_min(self, other: T) -> T
fn defensive_min(self, other: T) -> T
§fn defensive_strict_min(self, other: T) -> T
fn defensive_strict_min(self, other: T) -> T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere
T: Codec,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere
T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moresource§impl<T> ToHex for T
impl<T> ToHex for T
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.