[][src]Struct http_sig::SimpleKeyProvider

pub struct SimpleKeyProvider { /* fields omitted */ }

Implementation of a simple key store.

Can store multiple keys with the same Key ID but different algorithms. If no algorithm is specified in the request, the first key added for that Key ID will be used.

Methods

impl SimpleKeyProvider[src]

pub fn new<I, S, K>(key_iter: I) -> Self where
    I: IntoIterator<Item = (S, K)>,
    S: Into<String>,
    K: Into<Arc<dyn HttpSignatureVerify>>, 
[src]

Initializes the key store from a list of key IDs and signature algorithms.

pub fn add(&mut self, key_id: &str, key: Arc<dyn HttpSignatureVerify>)[src]

Adds a key to the key store

pub fn clear(&mut self)[src]

Clears all keys from the key store

pub fn remove_all(&mut self, key_id: &str)[src]

Removes all keys with the specified Key ID from the key store

Trait Implementations

impl Clone for SimpleKeyProvider[src]

impl Debug for SimpleKeyProvider[src]

impl Default for SimpleKeyProvider[src]

impl KeyProvider for SimpleKeyProvider[src]

Auto Trait Implementations

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.