#[non_exhaustive]pub enum DeferDuration {
M15,
M30,
H1,
Unknown,
}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
M15
15 minutes.
M30
30 minutes.
H1
1 hour.
Unknown
#492: serde-level forward-compat catch-all — a newer client’s new defer option decodes here instead of failing the whole request on an older agent. Treated as the shortest defer.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeferDuration
Source§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>,
impl Eq for DeferDuration
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>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$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
self and other values to be equal, and is used by ==.Source§impl Serialize for DeferDuration
impl Serialize 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.