Type Alias sp_runtime::testing::sr25519::Public
source · pub type Public = CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>;
Expand description
An Schnorrkel/Ristretto x25519 (“sr25519”) public key.
Aliased Type§
struct Public(pub [u8; 32], _);
Fields§
§0: [u8; 32]
Implementations
source§impl<T> CryptoBytes<32, T>
impl<T> CryptoBytes<32, T>
sourcepub fn from_h256(x: H256) -> CryptoBytes<32, T>
pub fn from_h256(x: H256) -> CryptoBytes<32, T>
A new instance from an H256.
source§impl<T> CryptoBytes<64, T>
impl<T> CryptoBytes<64, T>
sourcepub fn from_h512(x: H512) -> CryptoBytes<64, T>
pub fn from_h512(x: H512) -> CryptoBytes<64, T>
A new instance from an H512.
Trait Implementations§
source§impl IdentifyAccount for Public
impl IdentifyAccount for Public
§type AccountId = CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>
type AccountId = CryptoBytes<sp_core::::sr25519::Public::{constant#0}, Sr25519PublicTag>
The account ID that this can be transformed into.
source§fn into_account(self) -> Self
fn into_account(self) -> Self
Transform into an account.
source§impl TryFrom<MultiSigner> for Public
impl TryFrom<MultiSigner> for Public
source§impl<const N: usize, T> ByteArray for CryptoBytes<N, T>
impl<const N: usize, T> ByteArray for CryptoBytes<N, T>
source§impl<const N: usize, T> Clone for CryptoBytes<N, T>
impl<const N: usize, T> Clone for CryptoBytes<N, T>
source§fn clone(&self) -> CryptoBytes<N, T>
fn clone(&self) -> CryptoBytes<N, T>
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<const N: usize, T> Decode for CryptoBytes<N, T>
impl<const N: usize, T> Decode for CryptoBytes<N, T>
source§fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<CryptoBytes<N, T>, Error>where
__CodecInputEdqy: Input,
fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<CryptoBytes<N, T>, Error>where
__CodecInputEdqy: Input,
Attempt to deserialise the value from input.
source§fn decode_into<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
dst_: &mut MaybeUninit<CryptoBytes<N, T>>,
) -> Result<DecodeFinished, Error>where
__CodecInputEdqy: Input,
fn decode_into<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy,
dst_: &mut MaybeUninit<CryptoBytes<N, T>>,
) -> Result<DecodeFinished, Error>where
__CodecInputEdqy: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
source§impl<const N: usize, T> Default for CryptoBytes<N, T>
impl<const N: usize, T> Default for CryptoBytes<N, T>
source§fn default() -> CryptoBytes<N, T>
fn default() -> CryptoBytes<N, T>
Returns the “default value” for a type. Read more
source§impl<const N: usize, T> Deref for CryptoBytes<N, T>
impl<const N: usize, T> Deref for CryptoBytes<N, T>
source§impl<const N: usize, T> Encode for CryptoBytes<N, T>
impl<const N: usize, T> Encode for CryptoBytes<N, T>
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<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> 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<const N: usize, T> FromEntropy for CryptoBytes<N, T>
impl<const N: usize, T> FromEntropy for CryptoBytes<N, T>
source§fn from_entropy(input: &mut impl Input) -> Result<CryptoBytes<N, T>, Error>
fn from_entropy(input: &mut impl Input) -> Result<CryptoBytes<N, T>, 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<const N: usize, T> Hash for CryptoBytes<N, T>
impl<const N: usize, T> Hash for CryptoBytes<N, T>
source§impl<const N: usize, T> MaxEncodedLen for CryptoBytes<N, T>
impl<const N: usize, T> MaxEncodedLen for CryptoBytes<N, T>
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<const N: usize, T> Ord for CryptoBytes<N, T>
impl<const N: usize, T> Ord for CryptoBytes<N, T>
source§fn cmp(&self, other: &CryptoBytes<N, T>) -> Ordering
fn cmp(&self, other: &CryptoBytes<N, T>) -> 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<const N: usize, T> PartialEq for CryptoBytes<N, T>
impl<const N: usize, T> PartialEq for CryptoBytes<N, T>
source§fn eq(&self, other: &CryptoBytes<N, T>) -> bool
fn eq(&self, other: &CryptoBytes<N, T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<const N: usize, T> PartialOrd for CryptoBytes<N, T>
impl<const N: usize, T> PartialOrd for CryptoBytes<N, T>
source§fn partial_cmp(&self, other: &CryptoBytes<N, T>) -> Option<Ordering>
fn partial_cmp(&self, other: &CryptoBytes<N, T>) -> 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<const N: usize, T> PassBy for CryptoBytes<N, T>
impl<const N: usize, T> PassBy for CryptoBytes<N, T>
source§impl<const N: usize, T> PassByInner for CryptoBytes<N, T>
impl<const N: usize, T> PassByInner for CryptoBytes<N, T>
source§fn into_inner(self) -> <CryptoBytes<N, T> as PassByInner>::Inner
fn into_inner(self) -> <CryptoBytes<N, T> as PassByInner>::Inner
Consumes
self
and returns the inner type.source§fn inner(&self) -> &<CryptoBytes<N, T> as PassByInner>::Inner
fn inner(&self) -> &<CryptoBytes<N, T> as PassByInner>::Inner
Returns the reference to the inner type.
source§fn from_inner(
inner: <CryptoBytes<N, T> as PassByInner>::Inner,
) -> CryptoBytes<N, T>
fn from_inner( inner: <CryptoBytes<N, T> as PassByInner>::Inner, ) -> CryptoBytes<N, T>
Construct
Self
from the given inner
.source§impl<const N: usize, T> TypeInfo for CryptoBytes<N, T>
impl<const N: usize, T> TypeInfo for CryptoBytes<N, T>
source§impl<const N: usize, T> UncheckedFrom<[u8; N]> for CryptoBytes<N, T>
impl<const N: usize, T> UncheckedFrom<[u8; N]> for CryptoBytes<N, T>
source§fn unchecked_from(data: [u8; N]) -> CryptoBytes<N, T>
fn unchecked_from(data: [u8; N]) -> CryptoBytes<N, T>
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.source§impl<T> UncheckedFrom<H256> for CryptoBytes<32, T>
impl<T> UncheckedFrom<H256> for CryptoBytes<32, T>
source§fn unchecked_from(x: H256) -> CryptoBytes<32, T>
fn unchecked_from(x: H256) -> CryptoBytes<32, T>
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.