pub enum Error {
Show 14 variants
NoRepository,
Config {
path: RepoPath,
message: String,
},
FormatsFile {
path: RepoPath,
message: String,
},
Path(String),
Init(String),
Harness(String),
New(String),
Info(String),
Start(String),
Guide(String),
Locate(String),
Query(String),
Io {
path: PathBuf,
source: Error,
},
Internal(String),
}Expand description
Error holds the errors of this crate. Every variant renders a message
that the CLI prints unchanged after error: .
Variants§
NoRepository
The tool finds no repository root (CLI-1_AC-5).
Config
The tool refuses a config.toml file (CONF-1_AC-3, CONF-1_AC-4,
CONF-2_AC-6, CONF-2_AC-7, CONF-3_AC-5, CONF-3_AC-6), or a file of
texts (CONF-12_AC-3, CONF-12_AC-4, CONF-12_AC-5).
Fields
FormatsFile
The tool refuses a formats.yaml file.
Fields
Path(String)
The tool refuses a PATHS argument whose path is not in the
repository (CLI-4_AC-15).
Init(String)
init refuses to run (contract-cli CLI-2), and the message identifies
the path or the option at fault.
Harness(String)
harness refuses to run (contract-cli CLI-3), and the message
identifies the harness, part, event, or file at fault.
New(String)
new refuses to run (contract-cli CLI-6).
Info(String)
info refuses to run (contract-cli CLI-5).
Start(String)
graph refuses a START argument, and the message lists each way the
tool can read the argument (CLI-7_AC-19).
Guide(String)
guide refuses an argument, a document, or a --state (contract-cli
CLI-17), and the message names the argument or the document.
Locate(String)
locate refuses an id, and the message gives the id and the paths
of the documents that declare it (CLI-8_AC-6).
Query(String)
A JMESPath expression doesn’t compile (CLI-4_AC-17, CLI-7_AC-21).
Io
An input or output (I/O) operation fails at a path.
Fields
Internal(String)
The code breaks one of its own invariants.
Implementations§
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()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more