[][src]Struct acme_lib::Directory

pub struct Directory<P: Persist> { /* fields omitted */ }

Entry point for accessing an ACME API.

Methods

impl<P: Persist> Directory<P>[src]

pub fn from_url(persist: P, url: DirectoryUrl) -> Result<Directory<P>>[src]

Create a directory over a persistence implementation and directory url.

pub fn account(&self, contact_email: &str) -> Result<Account<P>>[src]

Access an account identified by a contact email.

If a persisted private key exists for the contact email, it will be read and used for further access. This way we reuse the same ACME API account.

If one doesn't exist, it is created and the corresponding public key is uploaded to the ACME API thus creating the account.

Either way the newAccount API endpoint is called and thereby ensures the account is active and working.

pub fn api_directory(&self) -> &ApiDirectory[src]

Access the underlying JSON object for debugging.

Trait Implementations

impl<P: Clone + Persist> Clone for Directory<P>[src]

Auto Trait Implementations

impl<P> Send for Directory<P>

impl<P> Unpin for Directory<P> where
    P: Unpin

impl<P> Sync for Directory<P> where
    P: Sync

impl<P> UnwindSafe for Directory<P> where
    P: UnwindSafe

impl<P> RefUnwindSafe for Directory<P> where
    P: RefUnwindSafe

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]