[][src]Struct substrate_primitives::sr25519::Public

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

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

Methods

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_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!

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 to_raw_vec(self) -> Vec<u8>[src]

Return a Vec<u8> filled with raw data.

pub fn as_slice(&self) -> &[u8][src]

Return a slice filled with raw data.

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

Return a slice filled with raw data.

Trait Implementations

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

impl UncheckedFrom<H256> for Public[src]

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 Eq for Public[src]

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

impl Default for Public[src]

impl Clone for Public[src]

impl AsRef<Public> for Public[src]

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

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

impl PartialOrd<Public> for Public[src]

impl PartialEq<Public> for Public[src]

impl Ord for Public[src]

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

impl From<Public> for H256[src]

impl Hash for Public[src]

impl Debug for Public[src]

impl Display for Public[src]

impl Encode for Public[src]

impl Decode for Public[src]

impl Serialize for Public[src]

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

Auto Trait Implementations

impl Send for Public

impl Unpin for Public

impl Sync for Public

impl UnwindSafe for Public

impl RefUnwindSafe for Public

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> KeyedVec for T where
    T: Codec
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized

impl<T> InitializableFromZeroed for T where
    T: Default

impl<T> MaybeDebug for T where
    T: Debug
[src]