pub enum BundleError {
Io(Error),
Json(Error),
BadMagic {
expected: String,
found: String,
},
BadVersion {
found: u32,
supported: u32,
},
MissingManifest(String),
ChecksumMismatch {
path: String,
expected: String,
actual: String,
},
MissingMember(String),
UnexpectedMember(String),
UnsafePath(String),
MalformedStream(String),
SizeMismatch {
path: String,
expected: u64,
actual: u64,
},
}Expand description
A project-bundle error.
Variants§
Io(Error)
An underlying IO error (tar read/write, staging-file read, extraction write).
Json(Error)
The MANIFEST JSON failed to (de)serialize.
BadMagic
The first entry’s magic did not match — not a boatramp project bundle.
BadVersion
The bundle format version is not one this build reads.
Fields
supported: u32The version this build supports (BUNDLE_FORMAT_VERSION).
MissingManifest(String)
The bundle’s first entry was not the MANIFEST.
ChecksumMismatch
A member’s extracted bytes did not match the manifest checksum.
Fields
MissingMember(String)
A member named in the manifest was absent from the bundle.
UnexpectedMember(String)
A member present in the bundle was not described by the manifest.
UnsafePath(String)
A member path is unsafe (absolute or contains a ../. traversal component).
MalformedStream(String)
A v2 bundle is structurally malformed — a sidecar without its data member, a member without its preceding sidecar, a mismatched pairing, or a member out of declared order.
SizeMismatch
A member’s streamed byte count did not match the size it declared (sidecar/manifest).
Trait Implementations§
Source§impl Debug for BundleError
impl Debug for BundleError
Source§impl Display for BundleError
impl Display for BundleError
Source§impl Error for BundleError
impl Error for BundleError
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()
Source§impl From<Error> for BundleError
impl From<Error> for BundleError
Auto Trait Implementations§
impl !RefUnwindSafe for BundleError
impl !UnwindSafe for BundleError
impl Freeze for BundleError
impl Send for BundleError
impl Sync for BundleError
impl Unpin for BundleError
impl UnsafeUnpin for BundleError
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
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