pub enum Error {
InvalidProgram,
System {
reason: Option<String>,
},
StringConvert {
err: Box<dyn Error + 'static>,
},
Unknown,
}
Expand description
There are many potential causes for failure when running jq programs. This enum attempts to unify them all under a single type.
Variants§
InvalidProgram
The jq program failed to compile.
System
System errors are raised by the internal jq state machine. These can indicate problems parsing input, or even failures while initializing the state machine itself.
StringConvert
Errors encountered during conversion between CString/String or vice versa.
Unknown
Something bad happened, but it was unexpected.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
impl Send for Error
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl !Sync for Error
impl Unpin 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