[−][src]Struct substrate_primitives::sr25519::Public
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]
fn unchecked_from(x: [u8; 32]) -> Self
[src]
impl UncheckedFrom<H256> for Public
[src]
fn unchecked_from(x: H256) -> Self
[src]
impl Derive for Public
[src]
fn derive<Iter: Iterator<Item = DeriveJunction>>(
&self,
path: Iter
) -> Option<Public>
[src]
&self,
path: Iter
) -> Option<Public>
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]
fn partial_cmp(&self, other: &Public) -> Option<Ordering>
[src]
fn lt(&self, other: &Public) -> bool
[src]
fn le(&self, other: &Public) -> bool
[src]
fn gt(&self, other: &Public) -> bool
[src]
fn ge(&self, other: &Public) -> bool
[src]
impl PartialEq<Public> for Public
[src]
impl Ord for Public
[src]
fn cmp(&self, other: &Public) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl From<Public> for [u8; 32]
[src]
impl From<Public> for H256
[src]
impl Hash for Public
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Debug for Public
[src]
impl Display for Public
[src]
impl Encode for Public
[src]
fn encode_to<EncOut: Output>(&self, dest: &mut EncOut)
[src]
fn encode(&self) -> Vec<u8>
[src]
fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
impl Decode for Public
[src]
impl Serialize for Public
[src]
impl<'de> Deserialize<'de> for Public
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
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]
T: UncheckedFrom<S>,
fn unchecked_into(Self) -> T
[src]
impl<T> Ss58Codec for T where
T: Derive + Default + AsRef<[u8]> + AsMut<[u8]>,
[src]
T: Derive + Default + AsRef<[u8]> + AsMut<[u8]>,
fn from_ss58check(&str) -> Result<T, PublicError>
[src]
fn to_ss58check(&Self) -> String
[src]
fn from_string(&str) -> Result<T, PublicError>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<S> Codec for S where
S: Encode + Decode,
[src]
S: Encode + Decode,
impl<T> KeyedVec for T where
T: Codec,
[src]
T: Codec,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,