pub enum Error {
Show 19 variants
PathIo {
source: Error,
path: PathBuf,
},
Io(Error),
Logger(SetLoggerError),
Utf8(Utf8Error),
TomlDeserialization(Error),
TomlManifest(Error),
MultipleTargetsFlagsSpecified,
CargoBuildFailed,
NoBinaryFound,
BinaryToRunNotDetermined {
suggestions: String,
},
CargoLocateProjectFailed,
BinaryNotFound {
path: PathBuf,
},
PackageNotFound {
name: String,
},
SamplyNotFound,
RustSysrootFailed {
message: String,
},
RustHostTargetFailed {
message: String,
},
InvalidSamplyArgs(String),
CargoStdoutCaptureFailed(String),
CargoMetadataFailed(Error),
}Expand description
Comprehensive error type for cargo-samply operations.
This enum covers all possible error conditions that can occur during the build and profiling process, providing detailed error messages and context where appropriate.
Variants§
PathIo
I/O error with path context for better error reporting
Io(Error)
Generic I/O error
Logger(SetLoggerError)
Logger initialization error
Utf8(Utf8Error)
UTF-8 conversion error
TomlDeserialization(Error)
TOML deserialization error
TomlManifest(Error)
Cargo.toml manifest parsing error
MultipleTargetsFlagsSpecified
Target-selection flags (bin/example/bench/test) are mutually exclusive
CargoBuildFailed
Cargo build process failed
NoBinaryFound
No binary targets found in Cargo.toml
BinaryToRunNotDetermined
Multiple binaries found but no default specified
CargoLocateProjectFailed
Failed to locate the cargo project
BinaryNotFound
Built binary not found in target directory
PackageNotFound
Package not found in workspace
SamplyNotFound
Samply binary not installed or not in PATH
RustSysrootFailed
Failed to get Rust sysroot from rustc
RustHostTargetFailed
Failed to get Rust host target from rustc
InvalidSamplyArgs(String)
Invalid samply arguments
CargoStdoutCaptureFailed(String)
Failed to capture cargo stdout
CargoMetadataFailed(Error)
cargo-metadata execution failed
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()