Struct sp_runtime::testing::UintAuthorityId
source · pub struct UintAuthorityId(pub u64);
Expand description
A dummy type which can be used instead of regular cryptographic primitives.
- Wraps a
u64
AccountId
and is able toIdentifyAccount
. - Can be converted to any
Public
key. - Implements
RuntimeAppPublic
so it can be used instead of regular application-specific crypto.
Tuple Fields§
§0: u64
Implementations§
source§impl UintAuthorityId
impl UintAuthorityId
sourcepub fn to_public_key<T: ByteArray>(&self) -> T
pub fn to_public_key<T: ByteArray>(&self) -> T
Convert this authority ID into a public key.
source§impl UintAuthorityId
impl UintAuthorityId
sourcepub fn set_all_keys<T: Into<UintAuthorityId>>(keys: impl IntoIterator<Item = T>)
pub fn set_all_keys<T: Into<UintAuthorityId>>(keys: impl IntoIterator<Item = T>)
Set the list of keys returned by the runtime call for all keys of that type.
Trait Implementations§
source§impl AsRef<[u8]> for UintAuthorityId
impl AsRef<[u8]> for UintAuthorityId
source§impl Clone for UintAuthorityId
impl Clone for UintAuthorityId
source§fn clone(&self) -> UintAuthorityId
fn clone(&self) -> UintAuthorityId
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 CryptoType for UintAuthorityId
impl CryptoType for UintAuthorityId
source§impl Debug for UintAuthorityId
impl Debug for UintAuthorityId
source§impl Decode for UintAuthorityId
impl Decode for UintAuthorityId
source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<Self, Error>
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,
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 Default for UintAuthorityId
impl Default for UintAuthorityId
source§fn default() -> UintAuthorityId
fn default() -> UintAuthorityId
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for UintAuthorityId
impl<'de> Deserialize<'de> for UintAuthorityId
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Encode for UintAuthorityId
impl Encode for UintAuthorityId
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: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
)
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 using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&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 From<UintAuthorityId> for u64
impl From<UintAuthorityId> for u64
source§fn from(id: UintAuthorityId) -> u64
fn from(id: UintAuthorityId) -> u64
Converts to this type from the input type.
source§impl From<u64> for UintAuthorityId
impl From<u64> for UintAuthorityId
source§impl Hash for UintAuthorityId
impl Hash for UintAuthorityId
source§impl IdentifyAccount for UintAuthorityId
impl IdentifyAccount for UintAuthorityId
source§impl MaxEncodedLen for UintAuthorityId
impl MaxEncodedLen for UintAuthorityId
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 OpaqueKeys for UintAuthorityId
impl OpaqueKeys for UintAuthorityId
§type KeyTypeIdProviders = ()
type KeyTypeIdProviders = ()
Types bound to this opaque keys that provide the key type ids returned.
source§fn ownership_proof_is_valid(&self, _proof: &[u8]) -> bool
fn ownership_proof_is_valid(&self, _proof: &[u8]) -> bool
Verify a proof of ownership for the keys.
source§impl Ord for UintAuthorityId
impl Ord for UintAuthorityId
source§fn cmp(&self, other: &UintAuthorityId) -> Ordering
fn cmp(&self, other: &UintAuthorityId) -> 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 UintAuthorityId
impl PartialEq for UintAuthorityId
source§fn eq(&self, other: &UintAuthorityId) -> bool
fn eq(&self, other: &UintAuthorityId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UintAuthorityId
impl PartialOrd for UintAuthorityId
source§fn partial_cmp(&self, other: &UintAuthorityId) -> Option<Ordering>
fn partial_cmp(&self, other: &UintAuthorityId) -> 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 RuntimeAppPublic for UintAuthorityId
impl RuntimeAppPublic for UintAuthorityId
§type Signature = TestSignature
type Signature = TestSignature
The signature that will be generated when signing with the corresponding private key.
source§fn generate_pair(_: Option<Vec<u8>>) -> Self
fn generate_pair(_: Option<Vec<u8>>) -> Self
Generate a public/private pair with an optional
seed
and store it in the keystore. Read moresource§fn sign<M: AsRef<[u8]>>(&self, msg: &M) -> Option<Self::Signature>
fn sign<M: AsRef<[u8]>>(&self, msg: &M) -> Option<Self::Signature>
Sign the given message with the corresponding private key of this public key. Read more
source§impl Serialize for UintAuthorityId
impl Serialize for UintAuthorityId
source§impl TypeInfo for UintAuthorityId
impl TypeInfo for UintAuthorityId
impl EncodeLike for UintAuthorityId
impl Eq for UintAuthorityId
impl StructuralEq for UintAuthorityId
impl StructuralPartialEq for UintAuthorityId
Auto Trait Implementations§
impl RefUnwindSafe for UintAuthorityId
impl Send for UintAuthorityId
impl Sync for UintAuthorityId
impl Unpin for UintAuthorityId
impl UnwindSafe for UintAuthorityId
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for Uwhere T: ToByteSlice, U: AsRef<[T]> + ?Sized,
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for Uwhere U: AsRef<[u8]> + ?Sized,
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
source§impl<T> BoundToRuntimeAppPublic for Twhere
T: RuntimeAppPublic,
impl<T> BoundToRuntimeAppPublic for Twhere T: RuntimeAppPublic,
§type Public = T
type Public = T
The
RuntimeAppPublic
this type is bound to.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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,
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 Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
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 Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.