#[non_exhaustive]pub enum DeferDuration {
M15,
M30,
H1,
}Expand description
Allowed defer windows per SPEC §2.1 (15分 / 30分 / 1時間). The
fixed set avoids operators having to think about long-tail “user
deferred 3 days” scenarios — anything bigger goes through the
helpdesk.
Wire form mirrors SPEC §2.1’s 15m / 30m / 1h humantime
shorthand verbatim so JSON payloads read like operator-spoken
shorthand. The #[non_exhaustive] annotation leaves room for
future SPEC bumps to add windows (e.g. 2h) without forcing a
wire-protocol version change — downstream Rust consumers see a
compile-time nudge to add a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Source§impl DeferDuration
impl DeferDuration
Sourcepub fn as_duration(self) -> Duration
pub fn as_duration(self) -> Duration
Wall-clock duration this enum variant represents.
Trait Implementations§
Source§impl Clone for DeferDuration
impl Clone for DeferDuration
Source§fn clone(&self) -> DeferDuration
fn clone(&self) -> DeferDuration
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 DeferDuration
impl Debug for DeferDuration
Source§impl<'de> Deserialize<'de> for DeferDuration
impl<'de> Deserialize<'de> for DeferDuration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for DeferDuration
impl Hash for DeferDuration
Source§impl JsonSchema for DeferDuration
impl JsonSchema for DeferDuration
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DeferDuration
impl PartialEq for DeferDuration
Source§fn eq(&self, other: &DeferDuration) -> bool
fn eq(&self, other: &DeferDuration) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DeferDuration
impl Serialize for DeferDuration
impl Copy for DeferDuration
impl Eq for DeferDuration
impl StructuralPartialEq for DeferDuration
Auto Trait Implementations§
impl Freeze for DeferDuration
impl RefUnwindSafe for DeferDuration
impl Send for DeferDuration
impl Sync for DeferDuration
impl Unpin for DeferDuration
impl UnsafeUnpin for DeferDuration
impl UnwindSafe for DeferDuration
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