Struct sp_core::crypto::Dummy

source ·
pub struct Dummy;
Expand description

Dummy cryptography. Doesn’t do anything.

Trait Implementations§

source§

impl AsMut<[u8]> for Dummy

source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<[u8]> for Dummy

source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl ByteArray for Dummy

source§

const LEN: usize = 0usize

The “length” of the values of this type, which is always the same.
source§

fn from_slice(_: &[u8]) -> Result<Self, ()>

A new instance from the given slice that should be Self::LEN bytes long.
source§

fn to_raw_vec(&self) -> Vec<u8>

Return a Vec<u8> filled with raw data.
source§

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

Return a slice filled with raw data.
source§

impl Clone for Dummy

source§

fn clone(&self) -> Dummy

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CryptoType for Dummy

§

type Pair = Dummy

The pair key type of this crypto.
source§

impl Default for Dummy

source§

fn default() -> Dummy

Returns the “default value” for a type. Read more
source§

impl Derive for Dummy

source§

fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, _path: Iter ) -> Option<Self>

Derive a child key from a series of given junctions. Read more
source§

impl Hash for Dummy

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Pair for Dummy

§

type Public = Dummy

The type which is used to encode a public key.
§

type Seed = Dummy

The type used to (minimally) encode the data required to securely create a new key pair.
§

type Signature = Dummy

The type used to represent a signature. Can be created from a key pair and a message and verified with the message and a public key.
source§

fn generate_with_phrase(_: Option<&str>) -> (Self, String, Self::Seed)

Generate new secure (random) key pair and provide the recovery phrase. Read more
source§

fn from_phrase( _: &str, _: Option<&str> ) -> Result<(Self, Self::Seed), SecretStringError>

Returns the KeyPair from the English BIP39 seed phrase, or an error if it’s invalid.
source§

fn derive<Iter: Iterator<Item = DeriveJunction>>( &self, _: Iter, _: Option<Dummy> ) -> Result<(Self, Option<Dummy>), DeriveError>

Derive a child key from a series of given junctions.
source§

fn from_seed_slice(_: &[u8]) -> Result<Self, SecretStringError>

Make a new key pair from secret seed material. The slice must be the correct size or an error will be returned. Read more
source§

fn sign(&self, _: &[u8]) -> Self::Signature

Sign a message.
source§

fn verify<M: AsRef<[u8]>>(_: &Self::Signature, _: M, _: &Self::Public) -> bool

Verify a signature on a message. Returns true if the signature is good.
source§

fn public(&self) -> Self::Public

Get the public key.
source§

fn to_raw_vec(&self) -> Vec<u8>

Return a vec filled with raw data.
source§

fn generate() -> (Self, Self::Seed)

Generate new secure (random) key pair. Read more
source§

fn from_seed(seed: &Self::Seed) -> Self

Generate new key pair from the provided seed. Read more
source§

fn from_string_with_seed( s: &str, password_override: Option<&str> ) -> Result<(Self, Option<Self::Seed>), SecretStringError>

Interprets the string s in order to generate a key Pair. Returns both the pair and an optional seed, in the case that the pair can be expressed as a direct derivation from a seed (some cases, such as Sr25519 derivations with path components, cannot). Read more
source§

fn from_string( s: &str, password_override: Option<&str> ) -> Result<Self, SecretStringError>

Interprets the string s in order to generate a key pair. Read more
source§

impl PartialEq for Dummy

source§

fn eq(&self, other: &Dummy) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> TryFrom<&'a [u8]> for Dummy

§

type Error = ()

The type returned in the event of a conversion error.
source§

fn try_from(_: &'a [u8]) -> Result<Self, ()>

Performs the conversion.
source§

impl Eq for Dummy

source§

impl Public for Dummy

source§

impl StructuralEq for Dummy

source§

impl StructuralPartialEq for Dummy

Auto Trait Implementations§

§

impl RefUnwindSafe for Dummy

§

impl Send for Dummy

§

impl Sync for Dummy

§

impl Unpin for Dummy

§

impl UnwindSafe for Dummy

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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,

§

fn as_mut_byte_slice(&mut self) -> &mut [u8]

§

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,

§

fn as_slice_of<T>(&self) -> Result<&[T], Error>where T: FromByteSlice,

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CallHasher for Twhere T: Hash + ?Sized,

§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64where H: Hash + ?Sized, B: BuildHasher,

source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, Outer> IsWrappedBy<Outer> for Twhere Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> Ss58Codec for Twhere T: AsMut<[u8]> + AsRef<[u8]> + Public + Derive,

source§

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>

Some if the string is a properly encoded SS58Check address, optionally with a derivation path following.
source§

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>

Some if the string is a properly encoded SS58Check address.
source§

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

Return the ss58-check string for this key.
source§

fn to_ss58check(&self) -> String

Return the ss58-check string for this key.
source§

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

source§

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>,

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA)
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,

source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> JsonSchemaMaybe for T

§

impl<T> MaybeRefUnwindSafe for Twhere T: RefUnwindSafe,

source§

impl<T> SignatureBound for Twhere T: ByteArray,