[][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]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<P> Send for Directory<P>

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

Blanket Implementations

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

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

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.