Struct yacme_service::ProviderBuilder
source · pub struct ProviderBuilder { /* private fields */ }
Expand description
Build a provider from a directory or the URL of a directory.
Implementations§
source§impl ProviderBuilder
impl ProviderBuilder
sourcepub fn add_root_certificate(self, cert: Certificate) -> Self
pub fn add_root_certificate(self, cert: Certificate) -> Self
Explicitly add an additional root certificate to the underlying HTTP client.
sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Set a timeout for requests to connect.
sourcepub fn directory_url(self, url: Url) -> Self
pub fn directory_url(self, url: Url) -> Self
Set the dircetory URL, which will be used to fetch the directory if it isn’t provided.
sourcepub fn directory(self, directory: Directory) -> Self
pub fn directory(self, directory: Directory) -> Self
Set the full directory structure. This will be used instead of fetching the directory from the provided URL.
sourcepub fn name<S: Into<String>>(self, name: S) -> Self
pub fn name<S: Into<String>>(self, name: S) -> Self
Set the name of the provider, used for diagnostic messages.
sourcepub async fn build(self) -> Result<Provider, BuilderError>
pub async fn build(self) -> Result<Provider, BuilderError>
Build the provider.