pub enum AcmeMode {
Internal,
Anonymous,
WithEmail(String),
}Expand description
What ryra writes into tls.caddy on first install of caddy.
Modeled as an exhaustive enum so callers can’t smuggle a third
state via empty-string sentinels — match on this and the planner,
install message, and snippet renderer stay in agreement.
Variants§
Internal
Self-signed via Caddy’s internal CA (LAN-friendly default). Browsers warn unless ryra’s CA is trusted.
Anonymous
Let’s Encrypt with no registration email — real certs but no renewal-notice email tied to an account.
WithEmail(String)
Let’s Encrypt with a registration email for renewal notices.
Implementations§
Source§impl AcmeMode
impl AcmeMode
Sourcepub fn detect_from_snippet(contents: &str) -> Option<Self>
pub fn detect_from_snippet(contents: &str) -> Option<Self>
Best-effort reverse of Self::snippet: looks at the contents
of tls.caddy and recognizes the three ryra-written shapes —
tls internal, tls <email>, or an empty body. Returns None
for user-customized snippets (Cloudflare DNS-01, BYO cert paths,
arbitrary directives) so the install message can fall back to
“user-managed” instead of misclassifying.
Trait Implementations§
impl Eq for AcmeMode
impl StructuralPartialEq for AcmeMode
Auto Trait Implementations§
impl Freeze for AcmeMode
impl RefUnwindSafe for AcmeMode
impl Send for AcmeMode
impl Sync for AcmeMode
impl Unpin for AcmeMode
impl UnsafeUnpin for AcmeMode
impl UnwindSafe for AcmeMode
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.