Struct AcmeClient
pub struct AcmeClient { /* private fields */ }Expand description
Acme client that will used for all acme operations
Implementations§
§impl AcmeClient
impl AcmeClient
pub async fn new<S>(
directory_url: &str,
https_client: S,
) -> Result<AcmeClient, OpaqueError>
pub async fn new<S>( directory_url: &str, https_client: S, ) -> Result<AcmeClient, OpaqueError>
Create a new acme AcmeClient for the given directory url and using the provided https client
pub async fn new_for_provider<S>(
provider: &AcmeProvider,
https_client: S,
) -> Result<AcmeClient, OpaqueError>
pub async fn new_for_provider<S>( provider: &AcmeProvider, https_client: S, ) -> Result<AcmeClient, OpaqueError>
Create a new acme AcmeClient for the given AcmeProvider and using the provided https client
pub fn with_default_retry_duration(self, duration: Duration) -> AcmeClient
pub fn with_default_retry_duration(self, duration: Duration) -> AcmeClient
Set the default retry duration in case the ACME server doesn’t include a RetryAfter header
pub fn set_default_retry_duration(
&mut self,
duration: Duration,
) -> &mut AcmeClient
pub fn set_default_retry_duration( &mut self, duration: Duration, ) -> &mut AcmeClient
Set the default retry duration in case the ACME server doesn’t include a RetryAfter header
pub async fn fetch_nonce(&self) -> Result<String, OpaqueError>
pub async fn fetch_nonce(&self) -> Result<String, OpaqueError>
Fetch a nonce for making requests
pub async fn create_or_load_account(
&self,
account_key: EcdsaKey,
options: CreateAccountOptions,
) -> Result<Account<'_>, ClientError>
pub async fn create_or_load_account( &self, account_key: EcdsaKey, options: CreateAccountOptions, ) -> Result<Account<'_>, ClientError>
Load acme account that is associated with the given EcdsaKey. If no account
exists yet a new account will be created using the given CreateAccountOptions.
If you don’t wont this double functionality use: Self::create_account, or
Self::load_account instead.
pub async fn create_account(
&self,
options: CreateAccountOptions,
) -> Result<Account<'_>, ClientError>
pub async fn create_account( &self, options: CreateAccountOptions, ) -> Result<Account<'_>, ClientError>
Create a new acme account
Internally this will generate a new EcdsaKey which will be associated with this account
pub async fn create_account_with_key(
&self,
account_key: EcdsaKey,
options: CreateAccountOptions,
) -> Result<Account<'_>, ClientError>
pub async fn create_account_with_key( &self, account_key: EcdsaKey, options: CreateAccountOptions, ) -> Result<Account<'_>, ClientError>
Create a new acme account using the provided EcdsaKey
pub async fn load_account(
&self,
account_key: EcdsaKey,
) -> Result<Account<'_>, ClientError>
pub async fn load_account( &self, account_key: EcdsaKey, ) -> Result<Account<'_>, ClientError>
Load acme account which is associated with the given EcdsaKey
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AcmeClient
impl !RefUnwindSafe for AcmeClient
impl Send for AcmeClient
impl Sync for AcmeClient
impl Unpin for AcmeClient
impl !UnwindSafe for AcmeClient
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more