pub enum Error {
InvalidName(String),
InvalidRequest(String),
NotFound(String),
Refusal(String),
Corrupt(String),
Failure(String),
}Expand description
An error the CLI reports with a nonzero exit and no traceback. The variants mirror the Python error classes of Round 1, with Failure standing for the system failures the Python original let escape as tracebacks, the publish failure among them.
Variants§
InvalidName(String)
A run id is not in the shape the switch accepts.
InvalidRequest(String)
A request value, such as an instant or a threshold, is not usable.
NotFound(String)
The named run does not stand in the state file.
Refusal(String)
The standing state of the switch refuses the operation.
Corrupt(String)
The state document cannot be read as it was recorded.
Failure(String)
A system failure the operation cannot complete through.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()
Auto Trait Implementations§
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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
Mutably borrows from an owned value. Read more