pub enum AdapterError {
Io {
path: String,
source: Error,
},
Csv {
path: String,
source: Error,
},
Xlsx {
path: String,
source: Error,
},
EmptyXlsx {
path: String,
},
MissingColumn {
adapter: &'static str,
line: usize,
column: String,
},
Parse {
adapter: &'static str,
line: usize,
field: &'static str,
value: String,
reason: String,
},
UnknownSource {
path: String,
},
UnrecognizedSwanRole {
path: String,
},
HeaderNotFound {
adapter: &'static str,
},
PriceDataset(String),
}Variants§
Io
Csv
Xlsx
EmptyXlsx
Used by read_xlsx when the workbook has no worksheet (calamine returns None, not an error).
Distinct from Xlsx (which wraps a calamine error) so callers can pattern-match the cause.
MissingColumn
Parse
UnknownSource
UnrecognizedSwanRole
A file was detected as Swan (matched at least one role signature) but its header did not
match any of the three confirmed roles (trades / transfers / withdrawals). The actual trigger
is an unrecognized role, not a missing file — hence the rename from IncompleteSwanBatch.
HeaderNotFound
PriceDataset(String)
Trait Implementations§
Source§impl Debug for AdapterError
impl Debug for AdapterError
Source§impl Display for AdapterError
impl Display for AdapterError
Source§impl Error for AdapterError
impl Error for AdapterError
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 !RefUnwindSafe for AdapterError
impl !UnwindSafe for AdapterError
impl Freeze for AdapterError
impl Send for AdapterError
impl Sync for AdapterError
impl Unpin for AdapterError
impl UnsafeUnpin for AdapterError
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