pub struct AccountZone { /* private fields */ }Expand description
A deployment-configured, validated account-zone apex.
Constructed only via AccountZone::new / FromStr, both of which
reject anything that is not a normalized, lowercase, fully-qualified DNS
name with at least one delegation label below a public suffix (so an
operator cannot accidentally configure a bare TLD). There is intentionally
no Default: see the module docs on sane-degrade.
The apex is the zone NS-delegated to hyprstream — e.g. acct.example.com,
NOT *.acct.example.com and NOT a per-account host. Wildcard and
per-account hostnames are derived from it.
Implementations§
Source§impl AccountZone
impl AccountZone
Sourcepub fn new(apex: impl Into<String>) -> Result<Self, AccountZoneError>
pub fn new(apex: impl Into<String>) -> Result<Self, AccountZoneError>
Validate and wrap a zone apex like acct.example.com.
Rejects empty input, trailing dots, uppercase (use the normalized form),
underscores, leading digits-in-TLD-style oddities, labels over 63 octets,
total length over 253, consecutive dots, and bare public suffixes
(com, co.uk) which an operator almost certainly did not intend to
delegate whole to hyprstream.
Sourcepub fn wildcard_domain(&self) -> &str
pub fn wildcard_domain(&self) -> &str
The wildcard that covers exactly one label below the apex, e.g.
*.acct.example.com. This is the name the DNS-01 wildcard TLS
certificate is issued for, and the name wildcard A/AAAA records are
published under.
Sourcepub fn dns01_validation_name(&self) -> String
pub fn dns01_validation_name(&self) -> String
The DNS-01 _acme-challenge validation owner name for the wildcard
certificate. Per RFC 8555, a *. identifier is validated by publishing
the TXT record at _acme-challenge.<apex> (the apex, not the wildcard).
Sourcepub fn host_for_label(&self, label: &str) -> Result<String, AccountZoneError>
pub fn host_for_label(&self, label: &str) -> Result<String, AccountZoneError>
Build a per-account host label under this zone, asserting the label is a single DNS label (the depth the wildcard covers).
This is the A3 side of the A2 seam: A2 (#1160) owns the grammar of
the label; A3 owns the depth. We reject any label that contains a .
or is empty, because a multi-label label would escape the wildcard’s
single-label coverage and produce a hostname that does not resolve under
the issued certificate.
Trait Implementations§
Source§impl Clone for AccountZone
impl Clone for AccountZone
Source§fn clone(&self) -> AccountZone
fn clone(&self) -> AccountZone
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AccountZone
impl Debug for AccountZone
Source§impl<'de> Deserialize<'de> for AccountZone
impl<'de> Deserialize<'de> for AccountZone
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Source§impl Display for AccountZone
impl Display for AccountZone
Source§impl FromStr for AccountZone
impl FromStr for AccountZone
Source§impl Hash for AccountZone
impl Hash for AccountZone
Source§impl PartialEq for AccountZone
impl PartialEq for AccountZone
Source§fn eq(&self, other: &AccountZone) -> bool
fn eq(&self, other: &AccountZone) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AccountZone
impl Serialize for AccountZone
impl Eq for AccountZone
impl StructuralPartialEq for AccountZone
Auto Trait Implementations§
impl Freeze for AccountZone
impl RefUnwindSafe for AccountZone
impl Send for AccountZone
impl Sync for AccountZone
impl Unpin for AccountZone
impl UnsafeUnpin for AccountZone
impl UnwindSafe for AccountZone
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§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> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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.§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> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> JaggedSlice<T> for T
impl<T> JaggedSlice<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more