#[non_exhaustive]pub enum ContainerError {
Detect(DetectError),
UnsupportedVersion(Version),
FeatureNotEnabled {
feature: &'static str,
},
V1(Error),
V2Owned(OwnedReaderError),
V3Owned(OwnedReaderError),
Path(PathSegmentError),
Open {
path: PathBuf,
error: Error,
},
Read {
path: PathBuf,
error: Error,
},
IOError(Error),
}
Expand description
Various errors that may occur during Container
operations.
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.
Detect(DetectError)
Unable to detect the WEBC version.
UnsupportedVersion(Version)
An unsupported WEBC version was found.
FeatureNotEnabled
Parsing requires a feature to be enabled.
V1(Error)
Available on crate feature
v1
only.An error occurred while parsing a v1 WEBC file.
V2Owned(OwnedReaderError)
Available on crate feature
v2
only.An error occurred while parsing a v2 WEBC file.
V3Owned(OwnedReaderError)
Available on crate feature
v3
only.An error occurred while parsing a v3 WEBC file.
Path(PathSegmentError)
Path segment parsing failed.
Open
Unable to open a file.
Read
Unable to read a file’s contents into memory.
IOError(Error)
An IO error
Trait Implementations§
Source§impl Debug for ContainerError
impl Debug for ContainerError
Source§impl Display for ContainerError
impl Display for ContainerError
Source§impl Error for ContainerError
impl Error for ContainerError
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<DetectError> for ContainerError
impl From<DetectError> for ContainerError
Source§fn from(source: DetectError) -> Self
fn from(source: DetectError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for ContainerError
impl From<Error> for ContainerError
Source§impl From<Error> for ContainerError
impl From<Error> for ContainerError
Source§impl From<OwnedReaderError> for ContainerError
impl From<OwnedReaderError> for ContainerError
Source§fn from(source: OwnedReaderError) -> Self
fn from(source: OwnedReaderError) -> Self
Converts to this type from the input type.
Source§impl From<OwnedReaderError> for ContainerError
impl From<OwnedReaderError> for ContainerError
Source§fn from(source: OwnedReaderError) -> Self
fn from(source: OwnedReaderError) -> Self
Converts to this type from the input type.
Source§impl From<PathSegmentError> for ContainerError
impl From<PathSegmentError> for ContainerError
Source§fn from(source: PathSegmentError) -> Self
fn from(source: PathSegmentError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for ContainerError
impl !RefUnwindSafe for ContainerError
impl Send for ContainerError
impl Sync for ContainerError
impl Unpin for ContainerError
impl !UnwindSafe for ContainerError
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