[−][src]Struct acme2::AccountBuilder
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]
&mut self,
terms_of_service_agreed: bool
) -> &mut Self
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
Auto Trait Implementations
impl !RefUnwindSafe for AccountBuilder
[src]
impl Send for AccountBuilder
[src]
impl Sync for AccountBuilder
[src]
impl Unpin for AccountBuilder
[src]
impl !UnwindSafe for AccountBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,