pub enum ValidationError<'a> {
RenameToUnknownPackage {
old: &'a str,
new: &'a str,
},
RenameToItself(&'a str),
RenameExistingPackage(&'a str),
ArtefactHasUnknownComponent {
artefact: ArtefactQuery<'a>,
component_pkg: &'a str,
},
ArtefactComponentHasUnknownTarget {
artefact: ArtefactQuery<'a>,
component: ArtefactQuery<'a>,
},
ArtefactHasUnknownExtension {
artefact: ArtefactQuery<'a>,
extension_pkg: &'a str,
},
ArtefactExtensionHasUnknownTarget {
artefact: ArtefactQuery<'a>,
extension: ArtefactQuery<'a>,
},
DependencyLoop(Vec<ArtefactQuery<'a>>),
// some variants omitted
}Expand description
Possible ways in which channel metadata could be inconsistent.
See Channel::validate for more information.
Variants§
RenameToUnknownPackage
The channel’s renames field
says package old was renamed to new,
but no package named new is listed in the channel’s pkg map.
Fields
RenameToItself(&'a str)
The channel’s renames field
says this package was renamed to the same name.
RenameExistingPackage(&'a str)
The channel’s renames field
says this package was renamed,
but it’s still listed in the channel’s pkg map.
ArtefactHasUnknownComponent
artefact claims one of its components
is an artefact built from a package named component_pkg,
but no such package is listed in the channel’s pkg map.
Fields
artefact: ArtefactQuery<'a>The artefact that claims an unknown component.
ArtefactComponentHasUnknownTarget
artefact claims
one of its components is component,
but component.target is not listed
in component.pkg’s target map.
Fields
artefact: ArtefactQuery<'a>The artefact that claims a component with an unknown target.
component: ArtefactQuery<'a>The alleged artefact with the unknown target.
ArtefactHasUnknownExtension
artefact claims one of its extensions
is an artefact built from a package named extension_pkg,
but no such package is listed in the channel’s pkg map.
Fields
artefact: ArtefactQuery<'a>The artefact that claims an unknown extension.
ArtefactExtensionHasUnknownTarget
artefact claims
one of its extensions is extension,
but extension.target is not listed
in extension.pkg’s target map.
Fields
artefact: ArtefactQuery<'a>The artefact that claims an extension with an unknown target.
extension: ArtefactQuery<'a>The alleged artefact with the unknown target.
DependencyLoop(Vec<ArtefactQuery<'a>>)
A dependency loop was detected through all these artefacts.
That is, each artefact lists the next artefact as a required component, and the last artefact requires the first one.
Trait Implementations§
Source§impl<'a> Clone for ValidationError<'a>
impl<'a> Clone for ValidationError<'a>
Source§fn clone(&self) -> ValidationError<'a>
fn clone(&self) -> ValidationError<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more