pub enum DecimalFloatErrors {
Show 19 variants
CoefficientOverflow(CoefficientOverflow),
DivisionByZero(DivisionByZero),
ExponentOverflow(ExponentOverflow),
ExponentUnderflow(ExponentUnderflow),
FixedDecimalOverflow(FixedDecimalOverflow),
Log10Negative(Log10Negative),
Log10Zero(Log10Zero),
LogTablesNotDeployed(LogTablesNotDeployed),
LossyConversionFromFloat(LossyConversionFromFloat),
LossyConversionToFloat(LossyConversionToFloat),
MaximizeOverflow(MaximizeOverflow),
MulDivOverflow(MulDivOverflow),
NegativeFixedDecimalConversion(NegativeFixedDecimalConversion),
PowNegativeBase(PowNegativeBase),
ScientificMinNotLessThanMax(ScientificMinNotLessThanMax),
UnformatableExponent(UnformatableExponent),
WithTargetExponentOverflow(WithTargetExponentOverflow),
ZeroNegativePower(ZeroNegativePower),
ZeroStringStartPointer(ZeroStringStartPointer),
}Expand description
Container for all the DecimalFloat custom errors.
Variants§
CoefficientOverflow(CoefficientOverflow)
DivisionByZero(DivisionByZero)
ExponentOverflow(ExponentOverflow)
ExponentUnderflow(ExponentUnderflow)
FixedDecimalOverflow(FixedDecimalOverflow)
Log10Negative(Log10Negative)
Log10Zero(Log10Zero)
LogTablesNotDeployed(LogTablesNotDeployed)
LossyConversionFromFloat(LossyConversionFromFloat)
LossyConversionToFloat(LossyConversionToFloat)
MaximizeOverflow(MaximizeOverflow)
MulDivOverflow(MulDivOverflow)
NegativeFixedDecimalConversion(NegativeFixedDecimalConversion)
PowNegativeBase(PowNegativeBase)
ScientificMinNotLessThanMax(ScientificMinNotLessThanMax)
UnformatableExponent(UnformatableExponent)
WithTargetExponentOverflow(WithTargetExponentOverflow)
ZeroNegativePower(ZeroNegativePower)
ZeroStringStartPointer(ZeroStringStartPointer)
Implementations§
Source§impl DecimalFloatErrors
impl DecimalFloatErrors
Sourcepub const SELECTORS: &'static [[u8; 4]]
pub const SELECTORS: &'static [[u8; 4]]
All the selectors of this enum.
Note that the selectors might not be in the same order as the variants. No guarantees are made about the order of the selectors.
Prefer using SolInterface methods instead.
Sourcepub const VARIANT_NAMES: &'static [&'static str]
pub const VARIANT_NAMES: &'static [&'static str]
The names of the variants in the same order as SELECTORS.
Sourcepub const SIGNATURES: &'static [&'static str]
pub const SIGNATURES: &'static [&'static str]
The signatures in the same order as SELECTORS.
Source§impl DecimalFloatErrors
impl DecimalFloatErrors
Sourcepub fn coefficient_overflow(signed_coefficient: I256, exponent: I256) -> Self
pub fn coefficient_overflow(signed_coefficient: I256, exponent: I256) -> Self
Creates a CoefficientOverflow error.
error CoefficientOverflow(int256,int256)Sourcepub fn division_by_zero(signed_coefficient: I256, exponent: I256) -> Self
pub fn division_by_zero(signed_coefficient: I256, exponent: I256) -> Self
Creates a DivisionByZero error.
error DivisionByZero(int256,int256)Sourcepub fn exponent_overflow(signed_coefficient: I256, exponent: I256) -> Self
pub fn exponent_overflow(signed_coefficient: I256, exponent: I256) -> Self
Creates a ExponentOverflow error.
error ExponentOverflow(int256,int256)Sourcepub fn exponent_underflow(signed_coefficient: I256, exponent: I256) -> Self
pub fn exponent_underflow(signed_coefficient: I256, exponent: I256) -> Self
Creates a ExponentUnderflow error.
error ExponentUnderflow(int256,int256)Sourcepub fn fixed_decimal_overflow(
signed_coefficient: I256,
exponent: I256,
decimals: u8,
) -> Self
pub fn fixed_decimal_overflow( signed_coefficient: I256, exponent: I256, decimals: u8, ) -> Self
Creates a FixedDecimalOverflow error.
error FixedDecimalOverflow(int256,int256,uint8)Sourcepub fn log_10_negative(signed_coefficient: I256, exponent: I256) -> Self
pub fn log_10_negative(signed_coefficient: I256, exponent: I256) -> Self
Creates a Log10Negative error.
error Log10Negative(int256,int256)Sourcepub fn log_10_zero() -> Self
pub fn log_10_zero() -> Self
Creates a Log10Zero error.
error Log10Zero()Sourcepub fn log_tables_not_deployed(
tables_address: Address,
expected_codehash: FixedBytes<32>,
actual_codehash: FixedBytes<32>,
) -> Self
pub fn log_tables_not_deployed( tables_address: Address, expected_codehash: FixedBytes<32>, actual_codehash: FixedBytes<32>, ) -> Self
Creates a LogTablesNotDeployed error.
error LogTablesNotDeployed(address,bytes32,bytes32)Sourcepub fn lossy_conversion_from_float(
signed_coefficient: I256,
exponent: I256,
) -> Self
pub fn lossy_conversion_from_float( signed_coefficient: I256, exponent: I256, ) -> Self
Creates a LossyConversionFromFloat error.
error LossyConversionFromFloat(int256,int256)Sourcepub fn lossy_conversion_to_float(
signed_coefficient: I256,
exponent: I256,
) -> Self
pub fn lossy_conversion_to_float( signed_coefficient: I256, exponent: I256, ) -> Self
Creates a LossyConversionToFloat error.
error LossyConversionToFloat(int256,int256)Sourcepub fn maximize_overflow(signed_coefficient: I256, exponent: I256) -> Self
pub fn maximize_overflow(signed_coefficient: I256, exponent: I256) -> Self
Creates a MaximizeOverflow error.
error MaximizeOverflow(int256,int256)Sourcepub fn mul_div_overflow(x: U256, y: U256, denominator: U256) -> Self
pub fn mul_div_overflow(x: U256, y: U256, denominator: U256) -> Self
Creates a MulDivOverflow error.
error MulDivOverflow(uint256,uint256,uint256)Sourcepub fn negative_fixed_decimal_conversion(
signed_coefficient: I256,
exponent: I256,
) -> Self
pub fn negative_fixed_decimal_conversion( signed_coefficient: I256, exponent: I256, ) -> Self
Creates a NegativeFixedDecimalConversion error.
error NegativeFixedDecimalConversion(int256,int256)Sourcepub fn pow_negative_base(signed_coefficient: I256, exponent: I256) -> Self
pub fn pow_negative_base(signed_coefficient: I256, exponent: I256) -> Self
Creates a PowNegativeBase error.
error PowNegativeBase(int256,int256)Sourcepub fn scientific_min_not_less_than_max(
scientific_min: <Float as SolType>::RustType,
scientific_max: <Float as SolType>::RustType,
) -> Self
pub fn scientific_min_not_less_than_max( scientific_min: <Float as SolType>::RustType, scientific_max: <Float as SolType>::RustType, ) -> Self
Creates a ScientificMinNotLessThanMax error.
error ScientificMinNotLessThanMax(bytes32,bytes32)Sourcepub fn unformatable_exponent(exponent: I256) -> Self
pub fn unformatable_exponent(exponent: I256) -> Self
Creates a UnformatableExponent error.
error UnformatableExponent(int256)Sourcepub fn with_target_exponent_overflow(
signed_coefficient: I256,
exponent: I256,
target_exponent: I256,
) -> Self
pub fn with_target_exponent_overflow( signed_coefficient: I256, exponent: I256, target_exponent: I256, ) -> Self
Creates a WithTargetExponentOverflow error.
error WithTargetExponentOverflow(int256,int256,int256)Sourcepub fn zero_negative_power(b: <Float as SolType>::RustType) -> Self
pub fn zero_negative_power(b: <Float as SolType>::RustType) -> Self
Creates a ZeroNegativePower error.
error ZeroNegativePower(bytes32)Sourcepub fn zero_string_start_pointer() -> Self
pub fn zero_string_start_pointer() -> Self
Creates a ZeroStringStartPointer error.
error ZeroStringStartPointer()Trait Implementations§
Source§impl Clone for DecimalFloatErrors
impl Clone for DecimalFloatErrors
Source§fn clone(&self) -> DecimalFloatErrors
fn clone(&self) -> DecimalFloatErrors
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecimalFloatErrors
impl Debug for DecimalFloatErrors
impl Eq for DecimalFloatErrors
Source§impl Hash for DecimalFloatErrors
impl Hash for DecimalFloatErrors
Source§impl PartialEq for DecimalFloatErrors
impl PartialEq for DecimalFloatErrors
Source§impl SolInterface for DecimalFloatErrors
impl SolInterface for DecimalFloatErrors
Source§const MIN_DATA_LENGTH: usize = 0usize
const MIN_DATA_LENGTH: usize = 0usize
Source§fn valid_selector(selector: [u8; 4]) -> bool
fn valid_selector(selector: [u8; 4]) -> bool
true if the given selector is known to this type.Source§fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> Result<Self>
fn abi_decode_raw(selector: [u8; 4], data: &[u8]) -> Result<Self>
self.Source§fn abi_decode_raw_validate(selector: [u8; 4], data: &[u8]) -> Result<Self>
fn abi_decode_raw_validate(selector: [u8; 4], data: &[u8]) -> Result<Self>
self, with validation. Read moreSource§fn abi_encoded_size(&self) -> usize
fn abi_encoded_size(&self) -> usize
Source§fn abi_encode_raw(&self, out: &mut Vec<u8>)
fn abi_encode_raw(&self, out: &mut Vec<u8>)
self into the given buffer, without any selectors.Source§fn type_check(selector: [u8; 4]) -> Result<(), Error>
fn type_check(selector: [u8; 4]) -> Result<(), Error>
impl StructuralPartialEq for DecimalFloatErrors
Auto Trait Implementations§
impl Freeze for DecimalFloatErrors
impl RefUnwindSafe for DecimalFloatErrors
impl Send for DecimalFloatErrors
impl Sync for DecimalFloatErrors
impl Unpin for DecimalFloatErrors
impl UnsafeUnpin for DecimalFloatErrors
impl UnwindSafe for DecimalFloatErrors
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
key and return true if they are equal.Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.