[][src]Enum sc_service::config::NodeKeyConfig

pub enum NodeKeyConfig {
    Ed25519(Secret<SecretKey>),
}

The configuration of a node's secret key, describing the type of key and how it is obtained. A node's identity keypair is the result of the evaluation of the node key configuration.

Variants

Ed25519(Secret<SecretKey>)

A Ed25519 secret key configuration.

Implementations

impl NodeKeyConfig[src]

pub fn into_keypair(self) -> Result<Keypair, Error>[src]

Evaluate a NodeKeyConfig to obtain an identity Keypair:

  • If the secret is configured as input, the corresponding keypair is returned.

  • If the secret is configured as a file, it is read from that file, if it exists. Otherwise a new secret is generated and stored. In either case, the keypair obtained from the secret is returned.

  • If the secret is configured to be new, it is generated and the corresponding keypair is returned.

Trait Implementations

impl Clone for NodeKeyConfig[src]

impl Debug for NodeKeyConfig[src]

impl Default for NodeKeyConfig[src]

Auto Trait Implementations

impl RefUnwindSafe for NodeKeyConfig

impl Send for NodeKeyConfig

impl Sync for NodeKeyConfig

impl Unpin for NodeKeyConfig

impl UnwindSafe for NodeKeyConfig

Blanket Implementations

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

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

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

impl<T> CheckedConversion for T[src]

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

impl<T> Erased for T[src]

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

impl<T> InitializableFromZeroed for T where
    T: Default
[src]

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

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

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

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

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

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

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

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

type Output = T

Should always be Self

impl<T> SaturatedConversion for T[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

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

type Owned = T

The resulting type after obtaining ownership.

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<T, S> UniqueSaturatedInto<T> for S where
    S: TryInto<T>,
    T: Bounded
[src]

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