pub struct ResolvedTtl {
pub short_ttl_secs: Option<i64>,
pub mid_ttl_secs: Option<i64>,
pub long_ttl_secs: Option<i64>,
pub short_extend_secs: i64,
pub mid_extend_secs: i64,
}Expand description
Resolved TTL values after merging config overrides with compiled defaults.
Fields§
§short_ttl_secs: Option<i64>§mid_ttl_secs: Option<i64>§long_ttl_secs: Option<i64>§short_extend_secs: i64§mid_extend_secs: i64Implementations§
Source§impl ResolvedTtl
impl ResolvedTtl
Sourcepub fn from_config(cfg: Option<&TtlConfig>) -> Self
pub fn from_config(cfg: Option<&TtlConfig>) -> Self
Build from optional config overrides, falling back to compiled defaults.
TTL values are clamped to MAX_TTL_SECS (10 years) to prevent overflow.
Extension values are clamped to non-negative.
Sourcepub fn ttl_for_tier(&self, tier: &Tier) -> Option<i64>
pub fn ttl_for_tier(&self, tier: &Tier) -> Option<i64>
Get the default TTL for a given tier.
Sourcepub fn extend_for_tier(&self, tier: &Tier) -> Option<i64>
pub fn extend_for_tier(&self, tier: &Tier) -> Option<i64>
Get the TTL extension on access for a given tier.
Trait Implementations§
Source§impl Clone for ResolvedTtl
impl Clone for ResolvedTtl
Source§fn clone(&self) -> ResolvedTtl
fn clone(&self) -> ResolvedTtl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolvedTtl
impl Debug for ResolvedTtl
Auto Trait Implementations§
impl Freeze for ResolvedTtl
impl RefUnwindSafe for ResolvedTtl
impl Send for ResolvedTtl
impl Sync for ResolvedTtl
impl Unpin for ResolvedTtl
impl UnsafeUnpin for ResolvedTtl
impl UnwindSafe for ResolvedTtl
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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