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§type Pair = CryptoBytes<0, DummyTag>
type Pair = CryptoBytes<0, DummyTag>
The pair key type of this crypto.
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<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>(
&self,
f: __CodecUsingEncodedCallback,
) -> __CodecOutputReturn
fn using_encoded<__CodecOutputReturn, __CodecUsingEncodedCallback: FnOnce(&[u8]) -> __CodecOutputReturn>( &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<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
source§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§impl PartialOrd for UintAuthorityId
impl PartialOrd for UintAuthorityId
source§impl RuntimeAppPublic for UintAuthorityId
impl RuntimeAppPublic for UintAuthorityId
source§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 StructuralPartialEq for UintAuthorityId
Auto Trait Implementations§
impl Freeze for UintAuthorityId
impl RefUnwindSafe for UintAuthorityId
impl Send for UintAuthorityId
impl Sync for UintAuthorityId
impl Unpin for UintAuthorityId
impl UnwindSafe for UintAuthorityId
Blanket Implementations§
source§impl<T, U> AsByteSlice<T> for U
impl<T, U> AsByteSlice<T> for U
fn as_byte_slice(&self) -> &[u8] ⓘ
source§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
source§impl<T> BoundToRuntimeAppPublic for Twhere
T: RuntimeAppPublic,
impl<T> BoundToRuntimeAppPublic for Twhere
T: RuntimeAppPublic,
source§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> 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
)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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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 moresource§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
.