pub enum IntakeError {
Declared {
limit: usize,
declared: u64,
},
Exceeded {
limit: usize,
},
Transport(Error),
}Expand description
Why an answer was not read.
The three arms are kept apart because they call for different next steps and because two of them are the counterparty’s fault while the third may be the network’s. Collapsing them would file this peer is misbehaving under try again later, which is the retry loop that never ends.
Variants§
Declared
The response declared a body past the ceiling. Refused before reading.
Exceeded
The body grew past the ceiling while it was being read.
Transport(Error)
The stream failed. Not a size refusal — the counterparty may be blameless.
Implementations§
Source§impl IntakeError
impl IntakeError
Sourcepub const fn is_refusal(&self) -> bool
pub const fn is_refusal(&self) -> bool
Whether this was a size refusal rather than a failure to read.
The distinction a caller needs in order to classify: a size refusal is permanent and repeating the call reaches the same wall, while a transport failure is the ordinary interrupted-call case every driver already has a ladder for.
Trait Implementations§
Source§impl Debug for IntakeError
impl Debug for IntakeError
Source§impl Display for IntakeError
impl Display for IntakeError
Source§impl Error for IntakeError
impl Error for IntakeError
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 !RefUnwindSafe for IntakeError
impl !UnwindSafe for IntakeError
impl Freeze for IntakeError
impl Send for IntakeError
impl Sync for IntakeError
impl Unpin for IntakeError
impl UnsafeUnpin for IntakeError
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> 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 more