Struct sp_runtime::AccountId32
source · pub struct AccountId32(/* private fields */);
Expand description
Re-export this since it’s part of the API of this crate. An opaque 32-byte cryptographic identifier.
Implementations§
source§impl AccountId32
impl AccountId32
sourcepub const fn new(inner: [u8; 32]) -> AccountId32
pub const fn new(inner: [u8; 32]) -> AccountId32
Create a new instance from its raw inner byte value.
Equivalent to this types From<[u8; 32]>
implementation. For the lack of const
support in traits we have this constructor.
Trait Implementations§
source§impl AsMut<[u8]> for AccountId32
impl AsMut<[u8]> for AccountId32
source§impl AsRef<[u8]> for AccountId32
impl AsRef<[u8]> for AccountId32
source§impl ByteArray for AccountId32
impl ByteArray for AccountId32
source§impl Clone for AccountId32
impl Clone for AccountId32
source§fn clone(&self) -> AccountId32
fn clone(&self) -> AccountId32
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 Debug for AccountId32
impl Debug for AccountId32
source§impl Decode for AccountId32
impl Decode for AccountId32
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<AccountId32, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<AccountId32, Error>where
__CodecInputEdqy: Input,
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> Deserialize<'de> for AccountId32
impl<'de> Deserialize<'de> for AccountId32
source§fn deserialize<D>(
deserializer: D
) -> Result<AccountId32, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<AccountId32, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for AccountId32
impl Display for AccountId32
source§impl Encode for AccountId32
impl Encode for AccountId32
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
)
fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy )
Convert self to a slice and append it to the destination.
source§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.
source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl From<Public> for AccountId32
impl From<Public> for AccountId32
source§fn from(k: Public) -> AccountId32
fn from(k: Public) -> AccountId32
Converts to this type from the input type.
source§impl From<Public> for AccountId32
impl From<Public> for AccountId32
source§fn from(k: Public) -> AccountId32
fn from(k: Public) -> AccountId32
Converts to this type from the input type.
source§impl FromEntropy for AccountId32
impl FromEntropy for AccountId32
Creates an AccountId32
from the input, which should contain at least 32 bytes.
source§fn from_entropy(input: &mut impl Input) -> Result<AccountId32, Error>
fn from_entropy(input: &mut impl Input) -> Result<AccountId32, Error>
Create a random value of
Self
given a stream of random bytes on input
. May only fail if
input
has an error.source§impl FromStr for AccountId32
impl FromStr for AccountId32
source§impl Hash for AccountId32
impl Hash for AccountId32
source§impl MaxEncodedLen for AccountId32
impl MaxEncodedLen for AccountId32
source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
source§impl Ord for AccountId32
impl Ord for AccountId32
source§fn cmp(&self, other: &AccountId32) -> Ordering
fn cmp(&self, other: &AccountId32) -> 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 PartialEq for AccountId32
impl PartialEq for AccountId32
source§fn eq(&self, other: &AccountId32) -> bool
fn eq(&self, other: &AccountId32) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AccountId32
impl PartialOrd for AccountId32
source§fn partial_cmp(&self, other: &AccountId32) -> Option<Ordering>
fn partial_cmp(&self, other: &AccountId32) -> 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 moresource§impl Serialize for AccountId32
impl Serialize for AccountId32
source§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 Ss58Codec for AccountId32
impl Ss58Codec for AccountId32
source§fn format_is_allowed(f: Ss58AddressFormat) -> bool
fn format_is_allowed(f: Ss58AddressFormat) -> bool
A format filterer, can be used to ensure that
from_ss58check
family only decode for
allowed identifiers. By default just refuses the two reserved identifiers.source§fn from_ss58check(s: &str) -> Result<Self, PublicError>
fn from_ss58check(s: &str) -> Result<Self, PublicError>
Some if the string is a properly encoded SS58Check address.
source§fn from_ss58check_with_version(
s: &str
) -> Result<(Self, Ss58AddressFormat), PublicError>
fn from_ss58check_with_version( s: &str ) -> Result<(Self, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address.
source§fn from_string(s: &str) -> Result<Self, PublicError>
fn from_string(s: &str) -> Result<Self, PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
source§fn to_ss58check_with_version(&self, version: Ss58AddressFormat) -> String
fn to_ss58check_with_version(&self, version: Ss58AddressFormat) -> String
Return the ss58-check string for this key.
source§fn to_ss58check(&self) -> String
fn to_ss58check(&self) -> String
Return the ss58-check string for this key.
source§fn from_string_with_version(
s: &str
) -> Result<(Self, Ss58AddressFormat), PublicError>
fn from_string_with_version( s: &str ) -> Result<(Self, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
source§impl<'a> TryFrom<&'a [u8]> for AccountId32
impl<'a> TryFrom<&'a [u8]> for AccountId32
source§impl TypeInfo for AccountId32
impl TypeInfo for AccountId32
source§impl UncheckedFrom<H256> for AccountId32
impl UncheckedFrom<H256> for AccountId32
source§fn unchecked_from(h: H256) -> AccountId32
fn unchecked_from(h: H256) -> AccountId32
Convert from an instance of
T
to Self. This is not guaranteed to be
whatever counts as a valid instance of T
and it’s up to the caller to
ensure that it makes sense.impl EncodeLike for AccountId32
impl Eq for AccountId32
impl StructuralEq for AccountId32
impl StructuralPartialEq for AccountId32
Auto Trait Implementations§
impl RefUnwindSafe for AccountId32
impl Send for AccountId32
impl Sync for AccountId32
impl Unpin for AccountId32
impl UnwindSafe for AccountId32
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> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
source§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
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<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, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
source§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
)source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.