pub enum VolatilityError {
NonFinite,
Negative,
InsufficientReturns,
TooManyReturns,
ZeroWindow,
}Expand description
Errors returned by volatility helpers.
Variants§
NonFinite
Volatility and return inputs must be finite.
Negative
Volatility must not be negative.
InsufficientReturns
Sample volatility requires at least two return observations.
TooManyReturns
Sample volatility only supports observation counts representable as u32.
ZeroWindow
Window lengths must be non-zero.
Trait Implementations§
Source§impl Clone for VolatilityError
impl Clone for VolatilityError
Source§fn clone(&self) -> VolatilityError
fn clone(&self) -> VolatilityError
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 VolatilityError
impl Debug for VolatilityError
Source§impl Display for VolatilityError
impl Display for VolatilityError
Source§impl Error for VolatilityError
impl Error for VolatilityError
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 VolatilityError
impl PartialEq for VolatilityError
impl Copy for VolatilityError
impl Eq for VolatilityError
impl StructuralPartialEq for VolatilityError
Auto Trait Implementations§
impl Freeze for VolatilityError
impl RefUnwindSafe for VolatilityError
impl Send for VolatilityError
impl Sync for VolatilityError
impl Unpin for VolatilityError
impl UnsafeUnpin for VolatilityError
impl UnwindSafe for VolatilityError
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