pub struct DhttpHome { /* private fields */ }Expand description
A handle to the user’s dhttp home directory (e.g. ~/.dhttp/).
DhttpHome describes a directory that contains per-identity profiles and
a global settings file. It does not own any in-memory configuration data;
it is purely a typed path with helpers for resolving the layout inside.
Implementations§
Source§impl DhttpHome
impl DhttpHome
pub fn settings_path(&self) -> PathBuf
pub async fn load_settings( &self, ) -> Result<DhttpSettingsFile, LoadDhttpSettingsError>
pub fn new_settings(&self) -> DhttpSettingsFile
Source§impl DhttpHome
impl DhttpHome
Sourcepub async fn resolve_default_identity_profile(
&self,
) -> Result<IdentityProfile, ResolveDefaultIdentityProfileError>
pub async fn resolve_default_identity_profile( &self, ) -> Result<IdentityProfile, ResolveDefaultIdentityProfileError>
Read the settings file and resolve the default identity profile it points to.
Source§impl DhttpHome
impl DhttpHome
Sourcepub async fn resolve_identity_profile_exactly(
&self,
name: DhttpName<'_>,
) -> Result<IdentityProfile, ResolveIdentityProfileError>
pub async fn resolve_identity_profile_exactly( &self, name: DhttpName<'_>, ) -> Result<IdentityProfile, ResolveIdentityProfileError>
Resolve name to an IdentityProfile by exact match only (no wildcard fallback).
Sourcepub async fn resolve_identity_profile_wildcard(
&self,
name: DhttpName<'_>,
) -> Result<IdentityProfile, ResolveIdentityProfileError>
pub async fn resolve_identity_profile_wildcard( &self, name: DhttpName<'_>, ) -> Result<IdentityProfile, ResolveIdentityProfileError>
Resolve name to an IdentityProfile by wildcard match only (no exact fallback).
Sourcepub async fn resolve_identity_profile(
&self,
name: DhttpName<'_>,
) -> Result<IdentityProfile, ResolveIdentityProfileError>
pub async fn resolve_identity_profile( &self, name: DhttpName<'_>, ) -> Result<IdentityProfile, ResolveIdentityProfileError>
Resolve name to an IdentityProfile, trying exact match then wildcard match.
Sourcepub fn identity_profile_names(
&self,
) -> impl Stream<Item = Result<DhttpName<'static>, ListIdentityProfilesError>>
pub fn identity_profile_names( &self, ) -> impl Stream<Item = Result<DhttpName<'static>, ListIdentityProfilesError>>
Stream the names of all identity profiles that look like a valid
<name>/ssl/ layout under this home directory.
pub async fn identity_profile_exists_exactly(&self, name: DhttpName<'_>) -> bool
pub async fn identity_profile_exists_wildcard( &self, name: DhttpName<'_>, ) -> bool
pub async fn identity_profile_exists(&self, name: DhttpName<'_>) -> bool
Source§impl DhttpHome
impl DhttpHome
pub fn join_identity_name(&self, name: DhttpName<'_>) -> PathBuf
Sourcepub fn identity_profile(&self, name: DhttpName<'_>) -> IdentityProfile
pub fn identity_profile(&self, name: DhttpName<'_>) -> IdentityProfile
Construct an IdentityProfile handle for name without touching disk.
Use this when you only need the typed path (for example to compute a
child file path). To verify that the directory actually exists, call
DhttpHome::resolve_identity_profile instead.