pub struct FillError { /* private fields */ }Expand description
A flattened terminal error for a fill: the node’s pull leg records why its pull
ended, and the serve-side SessionOutboardReader / data reader surface it.
A String message rather than anyhow::Error because the outcome must be
Clone (every observer reads it) and anyhow::Error is not.
Implementations§
Source§impl FillError
impl FillError
Sourcepub fn held_bytes_cap(msg: impl Into<String>) -> Self
pub fn held_bytes_cap(msg: impl Into<String>) -> Self
A fill that ended because storing more of its range would push the
bytes this node holds for the blob past its max_blob_size cap. The
node serves what it holds and refuses the rest, so a serve that reads
past it ends as a refusal, not as a node fault.
Sourcepub const fn is_held_bytes_cap(&self) -> bool
pub const fn is_held_bytes_cap(&self) -> bool
Whether the fill ended at the cap on bytes held (Self::held_bytes_cap).
Sourcepub fn unlanded(&self, context: impl Into<String>) -> Error
pub fn unlanded(&self, context: impl Into<String>) -> Error
The I/O error a serve read raises for bytes this ended fill did not
land, prefixed by context. The fill’s error stays in the error’s
source chain, so ended_at_held_bytes_cap finds it, and
is_unlanded holds for it.
Trait Implementations§
Source§impl Error for FillError
impl Error for FillError
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 FillError
impl RefUnwindSafe for FillError
impl Send for FillError
impl Sync for FillError
impl Unpin for FillError
impl UnsafeUnpin for FillError
impl UnwindSafe for FillError
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,
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