Struct sc_service::KeystoreContainer[][src]

pub struct KeystoreContainer { /* fields omitted */ }

Construct and hold different layers of Keystore wrappers

Implementations

impl KeystoreContainer[src]

pub fn new(config: &KeystoreConfig) -> Result<Self, Error>[src]

Construct KeystoreContainer

pub fn set_remote_keystore<T>(&mut self, remote: Arc<T>) where
    T: CryptoStore + SyncCryptoStore + 'static, 
[src]

Set the remote keystore. Should be called right away at startup and not at runtime: even though this overrides any previously set remote store, it does not reset any references previously handed out - they will stick araound.

pub fn keystore(&self) -> Arc<dyn CryptoStore>[src]

Returns an adapter to the asynchronous keystore that implements CryptoStore

pub fn sync_keystore(&self) -> SyncCryptoStorePtr[src]

Returns the synchrnous keystore wrapper

pub fn local_keystore(&self) -> Option<Arc<LocalKeystore>>[src]

Returns the local keystore if available

The function will return None if the available keystore is not a local keystore.

Note

Using the LocalKeystore will result in loosing the ability to use any other keystore implementation, like a remote keystore for example. Only use this if you a certain that you require it!

Auto Trait Implementations

impl !RefUnwindSafe for KeystoreContainer[src]

impl !Send for KeystoreContainer[src]

impl !Sync for KeystoreContainer[src]

impl Unpin for KeystoreContainer[src]

impl !UnwindSafe for KeystoreContainer[src]

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> Erased for T[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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: &Outer) -> &T[src]

Get a reference to the inner from the outer.

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

Get a mutable reference to the inner from the outer.

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

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

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

impl<T> WithSubscriber for T[src]