Skip to content

utils

Structs


firma_config_schema::utils::NonZeroDuration

Section titled “firma_config_schema::utils::NonZeroDuration”

Struct

A strictly non-zero duration.

NonZeroDuration owns the intrinsic non-zero invariant for configuration values that bound an operation, wait, retry, backoff, or session lifetime. Cross-field and runtime-specific validation remains with the consuming component.

Tuple Struct: ()

Methods:

  • fn new(duration: Duration) -> Result<Self, ZeroDurationError> - Constructs a value from a non-zero duration.
  • fn duration(self: &Self) -> Duration - Returns the wrapped duration.

Traits: Copy, Eq

Trait Implementations:

  • Serialize
    • fn serialize<S>(self: &Self, serializer: S) -> Result<<S as >::Ok, <S as >::Error>
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
  • PartialEq
    • fn eq(self: &Self, other: &NonZeroDuration) -> bool
  • Hash
    • fn hash<__H>(self: &Self, state: & mut __H)
  • Deserialize
    • fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error>
  • From
    • fn from(seconds: NonZeroU64) -> Self
  • PartialOrd
    • fn partial_cmp(self: &Self, other: &NonZeroDuration) -> $crate::option::Option<$crate::cmp::Ordering>
  • AsRef
    • fn as_ref(self: &Self) -> &Duration
  • Clone
    • fn clone(self: &Self) -> NonZeroDuration
  • TryFrom
    • fn try_from(duration: Duration) -> Result<Self, <Self as >::Error>
  • Ord
    • fn cmp(self: &Self, other: &NonZeroDuration) -> $crate::cmp::Ordering

firma_config_schema::utils::ZeroDurationError

Section titled “firma_config_schema::utils::ZeroDurationError”

Struct

Error returned when constructing a [NonZeroDuration] from a zero duration.

Unit Struct

Traits: Eq, Error, Copy

Trait Implementations:

  • PartialEq
    • fn eq(self: &Self, other: &ZeroDurationError) -> bool
  • Display
    • fn fmt(self: &Self, formatter: & mut fmt::Formatter) -> fmt::Result
  • Clone
    • fn clone(self: &Self) -> ZeroDurationError
  • Debug
    • fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result