[][src]Enum safe_core::client::SafeKey

pub enum SafeKey {
    App(Arc<AppFullId>),
    Client(Arc<ClientFullId>),
}

An enum representing the Full Id variants for a Client or App

Variants

Represents an application authorised by a client.

Client(Arc<ClientFullId>)

Represents a network client.

Methods

impl SafeKey[src]

pub fn client(full_id: ClientFullId) -> Self[src]

Create a client full ID.

pub fn client_from_bls_key(bls_sk: BlsSecretKey) -> Self[src]

Create a client full ID from a given secret BLS key.

pub fn app(full_id: AppFullId) -> Self[src]

Create an app full ID.

pub fn sign(&self, msg: &[u8]) -> Signature[src]

Sign a given message using the App / Client full id as required.

pub fn public_id(&self) -> PublicId[src]

Return a corresponding public ID.

Trait Implementations

impl Clone for SafeKey[src]

Auto Trait Implementations

impl Send for SafeKey

impl Unpin for SafeKey

impl Sync for SafeKey

impl UnwindSafe for SafeKey

impl RefUnwindSafe for SafeKey

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T> From<T> 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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

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