Struct sp_core::paired_crypto::Public
source · pub struct Public<const LEFT_PLUS_RIGHT_LEN: usize>(/* private fields */);
Expand description
A public key.
Trait Implementations§
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> AsRef<[u8; LEFT_PLUS_RIGHT_LEN]> for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> AsRef<[u8; LEFT_PLUS_RIGHT_LEN]> for Public<LEFT_PLUS_RIGHT_LEN>
source§fn as_ref(&self) -> &[u8; LEFT_PLUS_RIGHT_LEN]
fn as_ref(&self) -> &[u8; LEFT_PLUS_RIGHT_LEN]
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> ByteArray for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> ByteArray for Public<LEFT_PLUS_RIGHT_LEN>
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> Debug for Public<LEFT_PLUS_RIGHT_LEN>where
Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
[u8; LEFT_PLUS_RIGHT_LEN]: AsBytesRef,
impl<const LEFT_PLUS_RIGHT_LEN: usize> Debug for Public<LEFT_PLUS_RIGHT_LEN>where Public<LEFT_PLUS_RIGHT_LEN>: CryptoType, [u8; LEFT_PLUS_RIGHT_LEN]: AsBytesRef,
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> Decode for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Decode for Public<LEFT_PLUS_RIGHT_LEN>
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<'de, const LEFT_PLUS_RIGHT_LEN: usize> Deserialize<'de> for Public<LEFT_PLUS_RIGHT_LEN>where
Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
impl<'de, const LEFT_PLUS_RIGHT_LEN: usize> Deserialize<'de> for Public<LEFT_PLUS_RIGHT_LEN>where Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
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<const LEFT_PLUS_RIGHT_LEN: usize> Display for Public<LEFT_PLUS_RIGHT_LEN>where
Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
impl<const LEFT_PLUS_RIGHT_LEN: usize> Display for Public<LEFT_PLUS_RIGHT_LEN>where Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> Encode for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Encode for Public<LEFT_PLUS_RIGHT_LEN>
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<LeftPair: PairT, RightPair: PairT, const LEFT_PLUS_RIGHT_PUBLIC_LEN: usize, const SIGNATURE_LEN: usize> From<Pair<LeftPair, RightPair, LEFT_PLUS_RIGHT_PUBLIC_LEN, SIGNATURE_LEN>> for Public<LEFT_PLUS_RIGHT_PUBLIC_LEN>where
Pair<LeftPair, RightPair, LEFT_PLUS_RIGHT_PUBLIC_LEN, SIGNATURE_LEN>: PairT<Public = Public<LEFT_PLUS_RIGHT_PUBLIC_LEN>>,
impl<LeftPair: PairT, RightPair: PairT, const LEFT_PLUS_RIGHT_PUBLIC_LEN: usize, const SIGNATURE_LEN: usize> From<Pair<LeftPair, RightPair, LEFT_PLUS_RIGHT_PUBLIC_LEN, SIGNATURE_LEN>> for Public<LEFT_PLUS_RIGHT_PUBLIC_LEN>where Pair<LeftPair, RightPair, LEFT_PLUS_RIGHT_PUBLIC_LEN, SIGNATURE_LEN>: PairT<Public = Public<LEFT_PLUS_RIGHT_PUBLIC_LEN>>,
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> MaxEncodedLen for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> MaxEncodedLen for Public<LEFT_PLUS_RIGHT_LEN>
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 LEFT_PLUS_RIGHT_LEN: usize> Ord for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Ord for Public<LEFT_PLUS_RIGHT_LEN>
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 LEFT_PLUS_RIGHT_LEN: usize> PartialEq for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> PartialEq for Public<LEFT_PLUS_RIGHT_LEN>
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> PartialOrd for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> PartialOrd for Public<LEFT_PLUS_RIGHT_LEN>
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 LEFT_PLUS_RIGHT_LEN: usize> PassByInner for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> PassByInner for Public<LEFT_PLUS_RIGHT_LEN>
§type Inner = [u8; LEFT_PLUS_RIGHT_LEN]
type Inner = [u8; LEFT_PLUS_RIGHT_LEN]
The inner type that is wrapped by
Self
.source§fn into_inner(self) -> Self::Inner
fn into_inner(self) -> Self::Inner
Consumes
self
and returns the inner type.source§fn from_inner(inner: Self::Inner) -> Self
fn from_inner(inner: Self::Inner) -> Self
Construct
Self
from the given inner
.source§impl<const LEFT_PLUS_RIGHT_LEN: usize> Serialize for Public<LEFT_PLUS_RIGHT_LEN>where
Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
impl<const LEFT_PLUS_RIGHT_LEN: usize> Serialize for Public<LEFT_PLUS_RIGHT_LEN>where Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
source§impl<const LEFT_PLUS_RIGHT_LEN: usize> UncheckedFrom<[u8; LEFT_PLUS_RIGHT_LEN]> for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> UncheckedFrom<[u8; LEFT_PLUS_RIGHT_LEN]> for Public<LEFT_PLUS_RIGHT_LEN>
source§fn unchecked_from(data: [u8; LEFT_PLUS_RIGHT_LEN]) -> Self
fn unchecked_from(data: [u8; LEFT_PLUS_RIGHT_LEN]) -> Self
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.impl<const LEFT_PLUS_RIGHT_LEN: usize> EncodeLike for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Eq for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Public for Public<LEFT_PLUS_RIGHT_LEN>where Public<LEFT_PLUS_RIGHT_LEN>: CryptoType,
impl<const LEFT_PLUS_RIGHT_LEN: usize> StructuralEq for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> StructuralPartialEq for Public<LEFT_PLUS_RIGHT_LEN>
Auto Trait Implementations§
impl<const LEFT_PLUS_RIGHT_LEN: usize> RefUnwindSafe for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Send for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Sync for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> Unpin for Public<LEFT_PLUS_RIGHT_LEN>
impl<const LEFT_PLUS_RIGHT_LEN: usize> UnwindSafe for Public<LEFT_PLUS_RIGHT_LEN>
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> 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> 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.source§impl<T> FromFFIValue for Twhere
T: PassBy,
impl<T> FromFFIValue for Twhere T: PassBy,
§type SelfInstance = T
type SelfInstance = T
As
Self
can be an unsized type, it needs to be represented by a sized type at the host.
This SelfInstance
is the sized type.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> IntoFFIValue for Twhere
T: PassBy,
impl<T> IntoFFIValue for Twhere T: PassBy,
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> 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
.