pub enum DrawdownError {
NonFinite,
Positive,
InvalidPeak,
NegativeValue,
EmptySeries,
ZeroWindow,
EmptyLabel,
}Expand description
Errors returned by drawdown helpers.
Variants§
NonFinite
Drawdown and series values must be finite.
Positive
Drawdowns use zero-or-negative convention.
InvalidPeak
Peak values must be finite and strictly positive.
NegativeValue
Current values must not be negative.
EmptySeries
Maximum drawdown requires at least one value.
ZeroWindow
Window lengths must be non-zero.
EmptyLabel
Labels must be non-empty after trimming whitespace.
Trait Implementations§
Source§impl Clone for DrawdownError
impl Clone for DrawdownError
Source§fn clone(&self) -> DrawdownError
fn clone(&self) -> DrawdownError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DrawdownError
impl Debug for DrawdownError
Source§impl Display for DrawdownError
impl Display for DrawdownError
Source§impl Error for DrawdownError
impl Error for DrawdownError
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()
Source§impl PartialEq for DrawdownError
impl PartialEq for DrawdownError
impl Copy for DrawdownError
impl Eq for DrawdownError
impl StructuralPartialEq for DrawdownError
Auto Trait Implementations§
impl Freeze for DrawdownError
impl RefUnwindSafe for DrawdownError
impl Send for DrawdownError
impl Sync for DrawdownError
impl Unpin for DrawdownError
impl UnsafeUnpin for DrawdownError
impl UnwindSafe for DrawdownError
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