pub enum IndicatorError {
InvalidPeriod {
name: &'static str,
period: usize,
},
InvalidParameter {
name: &'static str,
parameter: &'static str,
value: Decimal,
},
}Expand description
Common configuration errors emitted by indicators.
Variants§
InvalidPeriod
Returned when a period of zero is provided.
InvalidParameter
Returned when a parameter must be non-negative.
Implementations§
Source§impl IndicatorError
impl IndicatorError
Sourcepub fn invalid_period(name: &'static str, period: usize) -> Self
pub fn invalid_period(name: &'static str, period: usize) -> Self
Helper constructor for invalid period errors.
Sourcepub fn invalid_parameter(
name: &'static str,
parameter: &'static str,
value: Decimal,
) -> Self
pub fn invalid_parameter( name: &'static str, parameter: &'static str, value: Decimal, ) -> Self
Helper constructor for invalid parameter errors.
Trait Implementations§
Source§impl Debug for IndicatorError
impl Debug for IndicatorError
Source§impl Display for IndicatorError
impl Display for IndicatorError
Source§impl Error for IndicatorError
impl Error for IndicatorError
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 IndicatorError
impl PartialEq for IndicatorError
impl StructuralPartialEq for IndicatorError
Auto Trait Implementations§
impl Freeze for IndicatorError
impl RefUnwindSafe for IndicatorError
impl Send for IndicatorError
impl Sync for IndicatorError
impl Unpin for IndicatorError
impl UnsafeUnpin for IndicatorError
impl UnwindSafe for IndicatorError
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