#[non_exhaustive]pub struct PullTimeout {
pub after: Duration,
}Expand description
Typed sentinel for the buyer’s own per-candidate pull deadline firing (#857).
Returned (not a bare string) so the pull orchestrator can downcast_ref and
recognize that the timeout is OUR local deadline — a possibly mis-sized
configuration value — not evidence the provider is unreachable, and so must
not tar the provider’s local reputation score. Display keeps the
stable timed out text for logs (and for the !contains("timed out")
negative assertion in node_to_node_pull_through’s deadline test).
Since #1134 it is raised by OUR OWN wall clocks only, and the message is
deliberately stage-NEUTRAL because there are THREE of them: the shared
open_stream open bound (PullDeadlines::open), the optional overall
hard_cap the test-util wrappers apply, and the stall clock elapsing before
the FIRST byte (cumulative == 0) in the streaming loop — where it is
measuring the server’s time-to-first-byte, not mid-stream inactivity. decdn-node
also wraps open_progressive_pull in its per-candidate budget as belt-and-braces,
which raises the same sentinel.
The one thing it is NOT is a mid-stream STALL once bytes have flowed — that is
PullStalled, a fact about the PEER that scores its reputation, whereas this is a
fact about our own possibly mis-sized budget (or an honest slow server’s TTFB) and
must not. Keeping the two apart is the whole point of the split, and the cumulative == 0 carve-out is where the two loops draw the line (see PullStalled).
Callers that want to name the stage add a .context(…) layer; downcast_ref
still recovers the sentinel through it — pinned by
buyer_side_sentinels_survive_anyhow_downcast in decdn-node’s node_origin.rs,
not in this crate.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.after: DurationHow long the pull ran before the budget elapsed.
Trait Implementations§
Source§impl Debug for PullTimeout
impl Debug for PullTimeout
Source§impl Display for PullTimeout
impl Display for PullTimeout
Source§impl Error for PullTimeout
impl Error for PullTimeout
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PullTimeout
impl RefUnwindSafe for PullTimeout
impl Send for PullTimeout
impl Sync for PullTimeout
impl Unpin for PullTimeout
impl UnsafeUnpin for PullTimeout
impl UnwindSafe for PullTimeout
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for Twhere
T: Send,
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.