Enum cargo_dist::errors::DistError
source · pub enum DistError {
Show 34 variants
Io(Error),
Asset(AxoassetError),
Gazenot(GazenotError),
FromUtf8Error(FromUtf8Error),
Jinja {
source: String,
span: Option<SourceSpan>,
details: Error,
},
Wix {
msi: String,
details: Error,
},
WixInit {
package: String,
details: Error,
},
CargoTomlParse {
manifest_path: Utf8PathBuf,
cause: Error,
},
NoUpdateVersion {
project_version: Version,
running_version: Version,
},
CantEnableGithubUrlInconsistent {
inner: AxoprojectError,
},
CantEnableGithubNoUrl,
MustEnableTarGz,
InstallPathInvalid {
path: String,
},
InstallPathEnvSlash {
path: String,
},
InstallPathHomeSubdir {
path: String,
},
PreciseImpossible {
packages: Vec<String>,
},
NothingToRelease {
help: String,
},
TooManyUnrelatedApps {
help: String,
},
CheckFileMismatch {
file: SourceFile,
diff: String,
},
ContradictoryGenerateModes {
generate_mode: GenerateMode,
},
MultiPackageMsi {
artifact_name: String,
spec1: String,
spec2: String,
},
NoPackageMsi {
artifact_name: String,
},
MissingWixGuids {
manifest_path: Utf8PathBuf,
keys: &'static [&'static str],
},
UnrecognizedStyle {
style: String,
},
LinkageCheckInvalidOS {
host: String,
target: String,
},
LinkageCheckUnsupportedBinary {},
Goblin(Error),
FromPathBufError(FromPathBufError),
EnvParseError {
line: String,
},
DialoguerError(Error),
AxotagError(TagError),
ProjectMissing {
sources: Vec<AxoprojectError>,
},
GitArchiveError {},
ToolMissing {
tool: String,
},
}Expand description
Errors cargo-dist can have
Variants§
Io(Error)
random i/o error
Asset(AxoassetError)
random axoasset error
Gazenot(GazenotError)
random gazenot error
FromUtf8Error(FromUtf8Error)
random string error
Jinja
Fields
span: Option<SourceSpan>The range the error was found on
A problem with a jinja template, which is always a cargo-dist bug
Wix
Error from (cargo-)wix
WixInit
Error from (cargo-)wix init
CargoTomlParse
Error parsing metadata in Cargo.toml (json because it’s from cargo-metadata)
NoUpdateVersion
Fields
User declined to update cargo-dist, refuse to make progress
CantEnableGithubUrlInconsistent
Fields
inner: AxoprojectErrorinner error that caught this
User tried to enable Github CI support but had inconsistent urls for the repo
CantEnableGithubNoUrl
User tried to enable Github CI support but no url for the repo
MustEnableTarGz
User declined to force tar.gz with npm
InstallPathInvalid
Completely unknown format to install-path
NOTE: we can’t use diagnostic(help) here because this will get crammed into
a serde_json error, reducing it to a String. So we inline the help!
InstallPathEnvSlash
Being pedantic about the env-var mode of install-path to be consistent
NOTE: we can’t use diagnostic(help) here because this will get crammed into
a serde_json error, reducing it to a String. So we inline the help!
InstallPathHomeSubdir
Being pedantic about the home mode of install-path to be consistent
NOTE: we can’t use diagnostic(help) here because this will get crammed into
a serde_json error, reducing it to a String. So we inline the help!
PreciseImpossible
Use explicitly requested workspace builds, but had packages with custom feature settings
NothingToRelease
parse_tag concluded there was nothing to release
parse_tag concluded there are too many unrelated things for a single tag
CheckFileMismatch
Not an error; indicates that a file’s contents differ via –check
ContradictoryGenerateModes
Fields
generate_mode: GenerateModeThe problematic mode
cargo dist generate was passed an explicit GenerateMode but the config in their Cargo.toml
has that mode set to allow-dirty, a contradiction!
MultiPackageMsi
Fields
msi with too many packages
NoPackageMsi
msi with too few packages
MissingWixGuids
Fields
manifest_path: Utf8PathBufThe Cargo.toml missing them
These GUIDs for msi’s are required and enforced by cargo dist generate --check
UnrecognizedStyle
unrecognized style
LinkageCheckInvalidOS
Linkage report can’t be run for this combination of OS and target
LinkageCheckUnsupportedBinary
Linkage report can’t be run for this target
Goblin(Error)
random i/o error
FromPathBufError(FromPathBufError)
random camino conversion error
EnvParseError
Error parsing a string containing an environment variable in VAR=value syntax
DialoguerError(Error)
random dialoguer error
AxotagError(TagError)
random axotag error
ProjectMissing
Fields
sources: Vec<AxoprojectError>axoproject’s error for the unidentified project
No workspace found from axoproject
GitArchiveError
An error running git archive
ToolMissing
A required tool is missing
Trait Implementations§
source§impl Diagnostic for DistError
impl Diagnostic for DistError
source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moresource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codesource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Diagnostics.source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic.source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
source§impl Error for DistError
impl Error for DistError
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
source§impl From<AxoassetError> for DistError
impl From<AxoassetError> for DistError
source§fn from(source: AxoassetError) -> Self
fn from(source: AxoassetError) -> Self
source§impl From<FromPathBufError> for DistError
impl From<FromPathBufError> for DistError
source§fn from(source: FromPathBufError) -> Self
fn from(source: FromPathBufError) -> Self
source§impl From<FromUtf8Error> for DistError
impl From<FromUtf8Error> for DistError
source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
source§impl From<GazenotError> for DistError
impl From<GazenotError> for DistError
source§fn from(source: GazenotError) -> Self
fn from(source: GazenotError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DistError
impl Send for DistError
impl Sync for DistError
impl Unpin for DistError
impl !UnwindSafe for DistError
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
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>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more