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
sourceimpl 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.
sourceimpl 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
sourceimpl AsRef<[u8]> for UintAuthorityId
impl AsRef<[u8]> for UintAuthorityId
sourceimpl BoundToRuntimeAppPublic for UintAuthorityId
impl BoundToRuntimeAppPublic for UintAuthorityId
type Public = UintAuthorityId
type Public = UintAuthorityId
The
RuntimeAppPublic
this type is bound to.sourceimpl Clone for UintAuthorityId
impl Clone for UintAuthorityId
sourcefn clone(&self) -> UintAuthorityId
fn clone(&self) -> UintAuthorityId
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl CryptoType for UintAuthorityId
impl CryptoType for UintAuthorityId
sourceimpl Debug for UintAuthorityId
impl Debug for UintAuthorityId
sourceimpl Decode for UintAuthorityId
impl Decode for UintAuthorityId
sourcefn 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.
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
sourceimpl Default for UintAuthorityId
impl Default for UintAuthorityId
sourcefn default() -> UintAuthorityId
fn default() -> UintAuthorityId
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for UintAuthorityId
impl<'de> Deserialize<'de> for UintAuthorityId
sourcefn 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
sourceimpl Encode for UintAuthorityId
impl Encode for UintAuthorityId
sourcefn 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.
sourcefn 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.
fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
sourceimpl From<UintAuthorityId> for u64
impl From<UintAuthorityId> for u64
sourcefn from(id: UintAuthorityId) -> u64
fn from(id: UintAuthorityId) -> u64
Converts to this type from the input type.
sourceimpl From<u64> for UintAuthorityId
impl From<u64> for UintAuthorityId
sourceimpl Hash for UintAuthorityId
impl Hash for UintAuthorityId
sourceimpl IdentifyAccount for UintAuthorityId
impl IdentifyAccount for UintAuthorityId
sourcefn into_account(self) -> Self::AccountId
fn into_account(self) -> Self::AccountId
Transform into an account.
sourceimpl MaxEncodedLen for UintAuthorityId
impl MaxEncodedLen for UintAuthorityId
sourcefn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Upper bound, in bytes, of the maximum encoded size of this item.
sourceimpl OpaqueKeys for UintAuthorityId
impl OpaqueKeys for UintAuthorityId
type KeyTypeIdProviders = ()
type KeyTypeIdProviders = ()
Types bound to this opaque keys that provide the key type ids returned.
sourcefn 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.
sourceimpl Ord for UintAuthorityId
impl Ord for UintAuthorityId
sourcefn cmp(&self, other: &UintAuthorityId) -> Ordering
fn cmp(&self, other: &UintAuthorityId) -> Ordering
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<UintAuthorityId> for UintAuthorityId
impl PartialEq<UintAuthorityId> for UintAuthorityId
sourcefn eq(&self, other: &UintAuthorityId) -> bool
fn eq(&self, other: &UintAuthorityId) -> bool
sourceimpl PartialOrd<UintAuthorityId> for UintAuthorityId
impl PartialOrd<UintAuthorityId> for UintAuthorityId
sourcefn partial_cmp(&self, other: &UintAuthorityId) -> Option<Ordering>
fn partial_cmp(&self, other: &UintAuthorityId) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl RuntimeAppPublic for UintAuthorityId
impl RuntimeAppPublic for UintAuthorityId
sourceconst CRYPTO_ID: CryptoTypeId = _
const CRYPTO_ID: CryptoTypeId = _
The identifier of the crypto type of this application-specific key type.
type Signature = TestSignature
type Signature = TestSignature
The signature that will be generated when signing with the corresponding private key.
sourcefn 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 moresourcefn 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
sourcefn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool
fn verify<M: AsRef<[u8]>>(&self, msg: &M, signature: &Self::Signature) -> bool
Verify that the given signature matches the given message using this public key.
sourcefn to_raw_vec(&self) -> Vec<u8> ⓘ
fn to_raw_vec(&self) -> Vec<u8> ⓘ
Returns
Self
as raw vec.sourceimpl Serialize for UintAuthorityId
impl Serialize for UintAuthorityId
sourceimpl TypeInfo for UintAuthorityId
impl TypeInfo for UintAuthorityId
type Identity = UintAuthorityId
type Identity = UintAuthorityId
The type identifying for which type info is provided. Read more
impl EncodeLike<UintAuthorityId> 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,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedConversion for T
impl<T> CheckedConversion for T
sourcefn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
sourcefn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
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 moreimpl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
fn decode_all_with_depth_limit(limit: u32, input: &mut &[u8]) -> Result<T, Error>
Decode
Self
and consume all of the given input data. Read morefn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>where
I: Input,
Decode
Self
with the given maximum recursion depth and advance input
by the number of
bytes consumed. Read moreimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<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,
sourcefn 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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<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>,
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
sourcefn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
sourcefn 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 moresourceimpl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere
T: AsRef<[u8]>,
sourcefn 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
) Read moresourcefn 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
) Read moresourceimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.sourceimpl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
sourcefn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.