#[non_exhaustive]pub enum RequestSentStatus {
Sent,
NotSent,
Unknown,
}Expand description
Tri-state indicating whether a request was sent on the wire.
This is critical for retry decisions:
Sent: The request was definitely transmitted; non-idempotent operations should not be retried without additional safeguards (etag checks).NotSent: The request definitely was NOT transmitted; safe to retry.Unknown: Cannot determine if request was sent; treat as potentially sent for safety (don’t retry non-idempotent operations).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Sent
Request was definitely sent on the wire. This is confirmed when we receive response headers or the transport completes successfully.
NotSent
Request was definitely NOT sent on the wire. This is confirmed for errors that occur before transmission (e.g., DNS resolution failure, connection refused).
Unknown
Cannot determine if request was sent. Treat as potentially sent for retry safety.
Implementations§
Source§impl RequestSentStatus
impl RequestSentStatus
Sourcepub fn may_have_been_sent(&self) -> bool
pub fn may_have_been_sent(&self) -> bool
Returns true if the request may have been sent.
This is conservative: returns true for both Sent and Unknown,
since we must assume Unknown might have been sent for retry safety.
Sourcepub fn definitely_sent(&self) -> bool
pub fn definitely_sent(&self) -> bool
Returns true if we know for certain the request was sent.
Sourcepub fn definitely_not_sent(&self) -> bool
pub fn definitely_not_sent(&self) -> bool
Returns true if we know for certain the request was NOT sent.
Trait Implementations§
Source§impl AsRef<str> for RequestSentStatus
impl AsRef<str> for RequestSentStatus
Source§impl Clone for RequestSentStatus
impl Clone for RequestSentStatus
Source§fn clone(&self) -> RequestSentStatus
fn clone(&self) -> RequestSentStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequestSentStatus
impl Debug for RequestSentStatus
Source§impl Default for RequestSentStatus
impl Default for RequestSentStatus
Source§fn default() -> RequestSentStatus
fn default() -> RequestSentStatus
Source§impl Display for RequestSentStatus
impl Display for RequestSentStatus
Source§impl PartialEq for RequestSentStatus
impl PartialEq for RequestSentStatus
Source§impl Serialize for RequestSentStatus
impl Serialize for RequestSentStatus
impl Copy for RequestSentStatus
impl Eq for RequestSentStatus
impl StructuralPartialEq for RequestSentStatus
Auto Trait Implementations§
impl Freeze for RequestSentStatus
impl RefUnwindSafe for RequestSentStatus
impl Send for RequestSentStatus
impl Sync for RequestSentStatus
impl Unpin for RequestSentStatus
impl UnsafeUnpin for RequestSentStatus
impl UnwindSafe for RequestSentStatus
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.