#[non_exhaustive]pub enum Error {
InvalidArgument(&'static str),
TimeNotIncreasing {
index: usize,
},
LengthMismatch {
column: &'static str,
},
InvalidOhlc {
index: usize,
},
UnknownId,
Unsupported(&'static str),
OutOfMemory,
}Expand description
Errors returned by the ferrochart-core public API. The public API never panics.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidArgument(&'static str)
An argument is outside its valid domain. The payload names the argument and the violated condition.
TimeNotIncreasing
A time column is not strictly increasing. index is the position in the
input where time[index] <= time[index - 1]. When the input itself is sorted
but does not fit the existing data, it is 0 for an append (first element
not after the last existing time) and len - 1 for a prepend (last element
not before the first existing time).
LengthMismatch
The input columns do not all have the same length. column names the
first column whose length differs from time.
InvalidOhlc
Bar index of the input violates the OHLC constraints (a non-finite value,
or low > min(open, close) / high < max(open, close) in Reject mode).
UnknownId
No series, pane or other object with this id exists.
Unsupported(&'static str)
The operation is not supported (yet) for this kind of object. The payload explains what is missing.
OutOfMemory
A required allocation could not be satisfied.
Trait Implementations§
impl Eq for Error
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()