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),
}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).
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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