[][src]Struct acme2::AccountBuilder

pub struct AccountBuilder { /* fields omitted */ }

An builder that is used to create / retrieve an Account from the ACME server.

Implementations

impl AccountBuilder[src]

pub fn new(directory: Arc<Directory>) -> Self[src]

This creates a new AccountBuilder. This can be used to create a new account (if the server has not seen the private key before), or to retrieve an existing account (using a previously used private key).

pub fn private_key(&mut self, private_key: PKey<Private>) -> &mut Self[src]

The private key that is used to sign requests to the ACME server. This may not be the same as a certificate private key.

pub fn contact(&mut self, contact: Vec<String>) -> &mut Self[src]

The contact information for the account. For example this could be a vec!["email:hello@lcas.dev".to_string()]. The supported contact types vary from one ACME server to another.

pub fn terms_of_service_agreed(
    &mut self,
    terms_of_service_agreed: bool
) -> &mut Self
[src]

If you agree to the ACME server terms of service.

pub fn only_return_existing(&mut self, only_return_existing: bool) -> &mut Self[src]

Do not try to create a new account. If this is set, only an existing account will be returned.

pub async fn build(&mut self) -> Result<Arc<Account>, Error>[src]

This will create / retrieve an Account from the ACME server.

If the AccountBuilder does not contain a private key, a new 4096 bit RSA key will be generated (using the system random). If a key is generated, it can be retrieved from the created Account through the Account::private_key method.

Trait Implementations

impl Debug for AccountBuilder[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> Instrument for T[src]

impl<T> Instrument for T[src]

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