Struct sp_core::ecdsa::Public[][src]

pub struct Public(_);

The ECDSA compressed public key.

Implementations

impl Public[src]

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

A new instance from the given 33-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_full(full: &[u8]) -> Result<Self, ()>[src]

Create a new instance from the given full public key.

This will convert the full public key into the compressed format.

Trait Implementations

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

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

impl Clone 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 Derive for Public[src]

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

impl From<Public> for CryptoTypePublicPair[src]

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; 33]>

The strategy that should be used to pass the type.

impl PassByInner for Public[src]

type Inner = [u8; 33]

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 33 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 TryFrom<&'_ [u8]> for Public[src]

type Error = ()

The type returned in the event of a conversion error.

impl UncheckedFrom<[u8; 33]> 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
[src]

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

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

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

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
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

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

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

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

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

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

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

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

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[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
[src]

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

impl<T> Instrument for T[src]

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
    T: From<Outer>,
    Outer: AsRef<T> + AsMut<T> + From<T>, 
[src]

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

Get a reference to the inner from the outer.

pub 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
[src]

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

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

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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[src]

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<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]