#[non_exhaustive]pub enum BundleError {
Validation(Vec<Diagnostic>),
Manifest {
path: PathBuf,
message: String,
},
Json {
path: String,
message: String,
},
Io {
path: PathBuf,
source: Error,
},
Key(String),
Archive(String),
SizeLimit {
kind: &'static str,
limit: usize,
},
Serialization(String),
}Expand description
Errors produced while compiling or decoding a bundle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Validation(Vec<Diagnostic>)
The input was readable but failed content validation.
Manifest
A manifest could not be decoded.
Json
JSON input could not be decoded.
Io
A filesystem operation failed.
Key(String)
A key could not be loaded or decoded.
Archive(String)
Archive framing or structure is invalid.
SizeLimit
A configured size limit was exceeded.
Serialization(String)
Serialization of an internally validated value failed.
Implementations§
Source§impl BundleError
impl BundleError
Sourcepub fn is_validation(&self) -> bool
pub fn is_validation(&self) -> bool
Whether this error represents invalid user-controlled bundle content.
Sourcepub fn diagnostics(&self) -> &[Diagnostic]
pub fn diagnostics(&self) -> &[Diagnostic]
Return structured diagnostics when available.
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()
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
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