#[non_exhaustive]pub enum SpoolError {
PrepareDir {
path: PathBuf,
source: Error,
},
Encode {
delivery_id: String,
source: Error,
},
Write {
path: PathBuf,
source: Error,
},
Commit {
from: PathBuf,
to: PathBuf,
source: Error,
},
SyncDir {
path: PathBuf,
source: Error,
},
AlreadyExists {
path: PathBuf,
},
ReadDir {
path: PathBuf,
source: Error,
},
Remove {
path: PathBuf,
source: Error,
},
}Expand description
Failures of the durable-write path. Every variant means the delivery is not safely recorded, so every one of them must reach the HTTP caller as a 5xx rather than a log line.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PrepareDir
The spool directory could not be created or hardened.
Encode
Serialising the entry failed.
Write
Writing or fsyncing the temp file failed — disk full, permission, or a genuine fsync error.
Commit
The atomic rename into place failed.
SyncDir
The directory fsync that makes the rename durable failed.
AlreadyExists
An entry already exists at the path a fresh delivery derives.
Defensive: GitHub always sends X-GitHub-Delivery, so two deliveries
only collide when the header is absent AND they land in the same
millisecond. Refusing is still the right answer — clobbering would
destroy a delivery that has already been acknowledged.
ReadDir
Listing the spool failed. Surfaced as a red health state rather than an empty (and therefore falsely healthy) listing.
Remove
Deleting an acknowledged entry failed.
Trait Implementations§
Source§impl Debug for SpoolError
impl Debug for SpoolError
Source§impl Display for SpoolError
impl Display for SpoolError
Source§impl Error for SpoolError
impl Error for SpoolError
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 SpoolError
impl !UnwindSafe for SpoolError
impl Freeze for SpoolError
impl Send for SpoolError
impl Sync for SpoolError
impl Unpin for SpoolError
impl UnsafeUnpin for SpoolError
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<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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