[][src]Struct sp_core::sr25519::Public

pub struct Public(pub [u8; 32]);

An Schnorrkel/Ristretto x25519 ("sr25519") public key.

Implementations

impl Public[src]

pub fn from_raw(data: [u8; 32]) -> Self[src]

A new instance from the given 32-byte data.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

pub fn from_h256(x: H256) -> Self[src]

A new instance from an H256.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

pub fn as_array_ref(&self) -> &[u8; 32][src]

Return a slice filled with raw data.

Trait Implementations

impl AsMut<[u8]> for Public[src]

impl AsRef<[u8; 32]> for Public[src]

impl AsRef<[u8]> for Public[src]

impl Clone for Public[src]

impl Copy for Public[src]

impl CryptoType for Public[src]

type Pair = Pair

The pair key type of this crypto.

impl Debug for Public[src]

impl Decode for Public[src]

impl Default for Public[src]

impl Deref for Public[src]

type Target = [u8]

The resulting type after dereferencing.

impl Derive for Public[src]

fn derive<Iter: Iterator<Item = DeriveJunction>>(
    &self,
    path: Iter
) -> Option<Public>
[src]

Derive a child key from a series of given junctions.

None if there are any hard junctions in there.

impl<'de> Deserialize<'de> for Public[src]

impl Display for Public[src]

impl Encode for Public[src]

impl EncodeLike<Public> for Public[src]

impl Eq for Public[src]

impl<'_> From<&'_ Public> for CryptoTypePublicPair[src]

impl From<Public> for AccountId32[src]

impl From<Public> for [u8; 32][src]

impl From<Public> for H256[src]

impl From<Public> for CryptoTypePublicPair[src]

impl FromStr for Public[src]

type Err = PublicError

The associated error which can be returned from parsing.

impl Hash for Public[src]

impl Ord for Public[src]

impl PartialEq<Public> for Public[src]

impl PartialOrd<Public> for Public[src]

impl PassBy for Public[src]

type PassBy = Inner<Public, [u8; 32]>

The strategy that should be used to pass the type.

impl PassByInner for Public[src]

type Inner = [u8; 32]

The inner type that is wrapped by Self.

impl Public for Public[src]

fn from_slice(data: &[u8]) -> Self[src]

A new instance from the given slice that should be 32 bytes long.

NOTE: No checking goes on to ensure this is a real public key. Only use it if you are certain that the array actually is a pubkey. GIGO!

impl Serialize for Public[src]

impl StructuralEq for Public[src]

impl StructuralPartialEq for Public[src]

impl<'_> TryFrom<&'_ [u8]> for Public[src]

type Error = ()

The type returned in the event of a conversion error.

impl UncheckedFrom<[u8; 32]> for Public[src]

impl UncheckedFrom<H256> for Public[src]

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> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> AsByteSlice<T> for U where
    T: ToByteSlice,
    U: AsRef<[T]> + ?Sized

impl<T, U> AsMutByteSlice<T> for U where
    T: ToMutByteSlice,
    U: AsMut<[T]> + ?Sized

impl<U> AsMutSliceOf for U where
    U: AsMut<[u8]> + ?Sized

impl<U> AsSliceOf for U where
    U: AsRef<[u8]> + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<S> Codec for S where
    S: Encode + Decode, 

impl<T, X> Decode for X where
    T: Decode + Into<X>,
    X: WrapperTypeDecode<Wrapped = T>, 

impl<T> DecodeAll for T where
    T: Decode, 

impl<T> DecodeLimit for T where
    T: Decode, 

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T, X> Encode for X where
    T: Encode + ?Sized,
    X: WrapperTypeEncode<Target = T>, 

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode, 

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode, 

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode, 

impl<T> EncodeLike<Box<T>> for T where
    T: Encode, 

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode, 

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FromFFIValue for T where
    T: PassBy
[src]

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. Read more

impl<S> FullCodec for S where
    S: Decode + FullEncode, 

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoFFIValue for T where
    T: PassBy
[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(&Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(&mut Outer) -> &mut T[src]

Get a mutable reference to the inner from the outer.

impl<T> KeyedVec for T where
    T: Codec, 

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe
[src]

impl<T> RIType for T where
    T: PassBy
[src]

type FFIType = <<T as PassBy>::PassBy as RIType>::FFIType

The ffi type that is used to represent Self.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Ss58Codec for T where
    T: Derive + AsRef<[u8]> + AsMut<[u8]> + Default
[src]

impl<T> ToHex for T where
    T: AsRef<[u8]>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<Inner, Outer, T> UncheckedFrom<T> for Outer where
    Inner: IsWrappedBy<Outer> + UncheckedFrom<T>,
    Outer: Wraps<Inner = Inner>, 
[src]

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,