pub enum CliError {
Store(StoreError),
Core(CoreError),
Adapter(AdapterError),
Sqlite(Error),
Csv(Error),
Io(Error),
BadEventRef(String),
Usage(String),
BadConfigValue {
key: String,
value: String,
},
}Variants§
Store(StoreError)
Core(CoreError)
Adapter(AdapterError)
Sqlite(Error)
Csv(Error)
C1: write_csv_exports (Task 15) uses ? on csv::Writer ops (→ csv::Error); csv::Error
is its own type (NOT covered by Io(#[from] io::Error), whose From goes the other way), so it
needs its own variant or Task 15 will not compile.
Io(Error)
BadEventRef(String)
A user-supplied event reference did not parse as a canonical EventId (eventref.rs).
Usage(String)
A CLI argument was malformed (bad USD/date/enum/wallet spec, or a contradictory flag set).
BadConfigValue
M1: a cli_config row held an unrecognized value (corrupt DB, future-written value, or manual
edit gone wrong). Returning an error is safer than silently misreading the stored intent.
Trait Implementations§
Source§impl Error for CliError
impl Error for CliError
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()
Source§impl From<AdapterError> for CliError
impl From<AdapterError> for CliError
Source§fn from(source: AdapterError) -> Self
fn from(source: AdapterError) -> Self
Converts to this type from the input type.
Source§impl From<StoreError> for CliError
impl From<StoreError> for CliError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CliError
impl !UnwindSafe for CliError
impl Freeze for CliError
impl Send for CliError
impl Sync for CliError
impl Unpin for CliError
impl UnsafeUnpin for CliError
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