pub enum DecimalError {
InvalidDecimal {
error: String,
},
InvalidPrecision {
error: String,
},
InvalidScale {
scale: i16,
},
RoundingError {
error: String,
},
IntermediateDecimalConversionError {
source: IntermediateDecimalError,
},
}
Expand description
Errors related to decimal operations.
Variants§
InvalidDecimal
Error when a decimal format or value is incorrect, the string isn’t even a decimal e.g. “notastring”, “-21.233.122” etc aka InvalidDecimal
InvalidPrecision
Decimal precision exceeds the allowed limit, e.g. precision above 75/76/whatever set by Scalar or non-positive aka InvalidPrecision
InvalidScale
Decimal scale is not valid. Here we use i16 in order to include invalid scale values
RoundingError
This error occurs when attempting to scale a decimal in such a way that a loss of precision occurs.
IntermediateDecimalConversionError
Errors that may occur when parsing an intermediate decimal into a posql decimal
Fields
§
source: IntermediateDecimalError
The underlying source error
Trait Implementations§
source§impl Debug for DecimalError
impl Debug for DecimalError
source§impl Display for DecimalError
impl Display for DecimalError
source§impl Error for DecimalError
impl Error for DecimalError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§impl ErrorCompat for DecimalError
impl ErrorCompat for DecimalError
source§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source
. Read moresource§impl From<DecimalError> for ArrowArrayToColumnConversionError
impl From<DecimalError> for ArrowArrayToColumnConversionError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<DecimalError> for ColumnOperationError
impl From<DecimalError> for ColumnOperationError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<DecimalError> for ConversionError
impl From<DecimalError> for ConversionError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<DecimalError> for ExpressionEvaluationError
impl From<DecimalError> for ExpressionEvaluationError
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<DecimalError> for String
impl From<DecimalError> for String
source§fn from(error: DecimalError) -> Self
fn from(error: DecimalError) -> Self
Converts to this type from the input type.
source§impl From<IntermediateDecimalError> for DecimalError
impl From<IntermediateDecimalError> for DecimalError
source§fn from(error: IntermediateDecimalError) -> Self
fn from(error: IntermediateDecimalError) -> Self
Converts to this type from the input type.
source§impl PartialEq for DecimalError
impl PartialEq for DecimalError
impl Eq for DecimalError
impl StructuralPartialEq for DecimalError
Auto Trait Implementations§
impl Freeze for DecimalError
impl RefUnwindSafe for DecimalError
impl Send for DecimalError
impl Sync for DecimalError
impl Unpin for DecimalError
impl UnwindSafe for DecimalError
Blanket Implementations§
source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more