Struct sp_core::bandersnatch::Public
source · pub struct Public(pub [u8; 33]);
Expand description
Bandersnatch public key.
Tuple Fields§
§0: [u8; 33]
Trait Implementations§
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 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 moresource§impl PassByInner for Public
impl PassByInner for Public
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 UncheckedFrom<[u8; 33]> for Public
impl UncheckedFrom<[u8; 33]> for Public
source§fn unchecked_from(raw: [u8; 33]) -> Self
fn unchecked_from(raw: [u8; 33]) -> 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.source§impl VrfCrypto for Public
impl VrfCrypto for Public
§type VrfSignData = VrfSignData
type VrfSignData = VrfSignData
VRF signing data.
§type VrfSignature = VrfSignature
type VrfSignature = VrfSignature
VRF signature.
source§impl VrfPublic for Public
impl VrfPublic for Public
source§fn vrf_verify(
&self,
data: &Self::VrfSignData,
signature: &Self::VrfSignature
) -> bool
fn vrf_verify( &self, data: &Self::VrfSignData, signature: &Self::VrfSignature ) -> bool
Verify input data signature.
impl Copy for Public
impl 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,
§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<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> 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§fn from_ffi_value(
context: &mut dyn FunctionContext,
arg: <<T as PassBy>::PassBy as RIType>::FFIType
) -> Result<T, String>
fn from_ffi_value( context: &mut dyn FunctionContext, arg: <<T as PassBy>::PassBy as RIType>::FFIType ) -> Result<T, String>
Create
SelfInstance
from the givensource§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§fn into_ffi_value(
self,
context: &mut dyn FunctionContext
) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
fn into_ffi_value( self, context: &mut dyn FunctionContext ) -> Result<<<T as PassBy>::PassBy as RIType>::FFIType, String>
Convert
self
into a ffi value.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> 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<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
.