#[non_exhaustive]pub enum ValueError {
Show 15 variants
InvalidId {
kind: &'static str,
value: String,
},
InvalidDecimal {
kind: &'static str,
text: String,
},
Negative {
kind: &'static str,
value: Decimal,
},
TooManyDigits {
digits: u32,
},
Unrepresentable {
kind: &'static str,
value: Decimal,
},
OutOfRange {
kind: &'static str,
},
Missing {
kind: &'static str,
},
InvertedRange {
from: i64,
to: i64,
},
TooLong {
kind: &'static str,
length: usize,
limit: usize,
},
BelowMinimum {
kind: &'static str,
value: Decimal,
minimum: Decimal,
},
AboveMaximum {
kind: &'static str,
value: Decimal,
maximum: Decimal,
},
OffStep {
kind: &'static str,
value: Decimal,
step: Decimal,
},
TooFine {
kind: &'static str,
value: Decimal,
digits: u32,
},
Mismatch {
kind: &'static str,
},
Unsupported {
kind: &'static str,
},
}Expand description
Reasons an identifier, a price, a volume or a moment in time is rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidId
The identifier is not a positive integer.
InvalidDecimal
The text is not a decimal number.
Negative
The value is below zero.
TooManyDigits
The symbol has more digits than a wire price carries.
Unrepresentable
The value is finer than the wire step or too large for the wire integer.
OutOfRange
The wire integer does not fit a decimal.
Missing
A message of the server lacks a field the value is built from.
InvertedRange
A range of time ends before it starts.
Fields
TooLong
The text has more characters than the server keeps.
Fields
BelowMinimum
The value is smaller than the symbol allows.
Fields
AboveMaximum
The value is larger than the symbol allows.
Fields
OffStep
The value is not a multiple of the step of the symbol.
Fields
TooFine
The value has more decimal places than the symbol has digits.
Fields
Mismatch
Two values that have to agree do not.
Unsupported
The value cannot be given for this kind of request.
Trait Implementations§
Source§impl Clone for ValueError
impl Clone for ValueError
Source§impl Debug for ValueError
impl Debug for ValueError
Source§impl Display for ValueError
impl Display for ValueError
impl Eq for ValueError
Source§impl Error for ValueError
impl Error for ValueError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()