Struct pallet_example_offchain_worker::crypto::Public
source · pub struct Public(_);
Expand description
A generic AppPublic
wrapper type over $public crypto; this has no specific App.
Implementations§
Trait Implementations§
source§impl AppCrypto for Public
impl AppCrypto for Public
source§const CRYPTO_ID: CryptoTypeId = sr25519::CRYPTO_ID
const CRYPTO_ID: CryptoTypeId = sr25519::CRYPTO_ID
Identifier of the crypto type of this application-specific key type.
source§impl ByteArray for Public
impl ByteArray for Public
source§impl Decode for Public
impl Decode for Public
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.
§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
§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
source§impl<'de> Deserialize<'de> for Public
impl<'de> Deserialize<'de> for Public
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 Public
impl Encode for Public
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.
§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
source§impl MaxEncodedLen for Public
impl MaxEncodedLen for Public
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 Public
impl Ord for Public
source§impl PartialEq<Public> for Public
impl PartialEq<Public> for Public
source§impl PartialOrd<Public> for Public
impl PartialOrd<Public> for Public
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 moreimpl EncodeLike<Public> for Public
impl Eq for Public
impl Public for Public
impl StructuralEq for Public
impl StructuralPartialEq for Public
Auto Trait Implementations§
impl RefUnwindSafe for Public
impl Send for Public
impl Sync for Public
impl Unpin for Public
impl UnwindSafe for Public
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<T, U> AsMutByteSlice<T> for Uwhere
T: ToMutByteSlice,
U: AsMut<[T]> + ?Sized,
impl<T, U> AsMutByteSlice<T> for Uwhere T: ToMutByteSlice, U: AsMut<[T]> + ?Sized,
fn as_mut_byte_slice(&mut self) -> &mut [u8] ⓘ
§impl<U> AsMutSliceOf for Uwhere
U: AsMut<[u8]> + ?Sized,
impl<U> AsMutSliceOf for Uwhere U: AsMut<[u8]> + ?Sized,
fn as_mut_slice_of<T>(&mut self) -> Result<&mut [T], Error>where T: FromByteSlice,
§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> 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
§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 more§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere T: Decode,
source§impl<T> DefensiveMax<T> for Twhere
T: PartialOrd<T>,
impl<T> DefensiveMax<T> for Twhere T: PartialOrd<T>,
source§fn defensive_max(self, other: T) -> T
fn defensive_max(self, other: T) -> T
source§fn defensive_strict_max(self, other: T) -> T
fn defensive_strict_max(self, other: T) -> T
source§impl<T> DefensiveMin<T> for Twhere
T: PartialOrd<T>,
impl<T> DefensiveMin<T> for Twhere T: PartialOrd<T>,
source§fn defensive_min(self, other: T) -> T
fn defensive_min(self, other: T) -> T
source§fn defensive_strict_min(self, other: T) -> T
fn defensive_strict_min(self, other: T) -> T
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
source§impl<T> Hashable for Twhere
T: Codec,
impl<T> Hashable for Twhere T: Codec,
fn blake2_128(&self) -> [u8; 16]
fn blake2_256(&self) -> [u8; 32]
fn blake2_128_concat(&self) -> Vec<u8, Global> ⓘ
fn twox_128(&self) -> [u8; 16]
fn twox_256(&self) -> [u8; 32]
fn twox_64_concat(&self) -> Vec<u8, Global> ⓘ
fn identity(&self) -> Vec<u8, Global> ⓘ
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, 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> KeyedVec for Twhere
T: Codec,
impl<T> KeyedVec for Twhere T: Codec,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> RuntimeAppPublic for Twhere
T: AppPublic + AsRef<<T as AppPublic>::Generic>,
<T as AppPublic>::Generic: RuntimePublic,
<T as AppCrypto>::Signature: TypeInfo + Codec + From<<<T as AppPublic>::Generic as RuntimePublic>::Signature> + AsRef<<<T as AppPublic>::Generic as RuntimePublic>::Signature>,
impl<T> RuntimeAppPublic for Twhere T: AppPublic + AsRef<<T as AppPublic>::Generic>, <T as AppPublic>::Generic: RuntimePublic, <T as AppCrypto>::Signature: TypeInfo + Codec + From<<<T as AppPublic>::Generic as RuntimePublic>::Signature> + AsRef<<<T as AppPublic>::Generic as RuntimePublic>::Signature>,
source§const ID: KeyTypeId = <T as AppCrypto>::ID
const ID: KeyTypeId = <T as AppCrypto>::ID
An identifier for this application-specific key type.
§type Signature = <T as AppCrypto>::Signature
type Signature = <T as AppCrypto>::Signature
The signature that will be generated when signing with the corresponding private key.
source§fn generate_pair(seed: Option<Vec<u8, Global>>) -> T
fn generate_pair(seed: Option<Vec<u8, Global>>) -> T
Generate a public/private pair with an optional
seed
and store it in the keystore. Read moresource§fn sign<M>(&self, msg: &M) -> Option<<T as RuntimeAppPublic>::Signature>where
M: AsRef<[u8]>,
fn sign<M>(&self, msg: &M) -> Option<<T as RuntimeAppPublic>::Signature>where M: AsRef<[u8]>,
Sign the given message with the corresponding private key of this public key. Read more
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> Ss58Codec for Twhere
T: AsMut<[u8]> + AsRef<[u8]> + Public + Derive,
impl<T> Ss58Codec for Twhere T: AsMut<[u8]> + AsRef<[u8]> + Public + Derive,
source§fn from_string(s: &str) -> Result<T, PublicError>
fn from_string(s: &str) -> Result<T, PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
source§fn from_string_with_version(
s: &str
) -> Result<(T, Ss58AddressFormat), PublicError>
fn from_string_with_version( s: &str ) -> Result<(T, Ss58AddressFormat), PublicError>
Some if the string is a properly encoded SS58Check address, optionally with
a derivation path following.
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 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§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<Inner, Outer, T> UncheckedFrom<T> for Outerwhere
Outer: Wraps<Inner = Inner>,
Inner: IsWrappedBy<Outer> + UncheckedFrom<T>,
impl<Inner, Outer, T> UncheckedFrom<T> for Outerwhere Outer: Wraps<Inner = Inner>, Inner: IsWrappedBy<Outer> + UncheckedFrom<T>,
source§fn unchecked_from(t: T) -> Outer
fn unchecked_from(t: T) -> Outer
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<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
.