pub enum RetryAfter {
Delay(DelaySeconds),
HttpDate(HttpDate),
}Expand description
Standard HTTP Retry-After value.
Variants§
Implementations§
Source§impl RetryAfter
impl RetryAfter
Sourcepub fn parse(
value: &[u8],
now: WallClockTimestamp,
) -> Result<Self, RetryAfterError>
pub fn parse( value: &[u8], now: WallClockTimestamp, ) -> Result<Self, RetryAfterError>
Parses delay-seconds or any HTTP-date form required by RFC 9110.
now is used only to resolve the two-digit year in the obsolete
RFC 850 form. The function acquires no clock itself.
Trait Implementations§
Source§impl Clone for RetryAfter
impl Clone for RetryAfter
Source§fn clone(&self) -> RetryAfter
fn clone(&self) -> RetryAfter
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 moreimpl Copy for RetryAfter
Source§impl Debug for RetryAfter
impl Debug for RetryAfter
impl Eq for RetryAfter
Source§impl PartialEq for RetryAfter
impl PartialEq for RetryAfter
impl StructuralPartialEq for RetryAfter
Auto Trait Implementations§
impl Freeze for RetryAfter
impl RefUnwindSafe for RetryAfter
impl Send for RetryAfter
impl Sync for RetryAfter
impl Unpin for RetryAfter
impl UnsafeUnpin for RetryAfter
impl UnwindSafe for RetryAfter
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