pub enum NumericBound {
Signed(i64),
Unsigned(u64),
FloatBits(u64),
}Expand description
A numeric bound usable across every numeric representation.
SchemaType derives Eq, and an i64 mantissa cannot represent
u64::MAX, so the bound is a three-family sum. Float bounds store canonical
IEEE-754 f64 bits (NaN/inf rejected at construction, -0.0 normalized
to +0.0) so the type stays Eq; comparisons always decode the bits back to
f64 and compare numerically, never by bit order.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for NumericBound
impl Clone for NumericBound
impl Copy for NumericBound
Source§impl Debug for NumericBound
impl Debug for NumericBound
Source§impl<'de> Deserialize<'de> for NumericBound
impl<'de> Deserialize<'de> for NumericBound
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NumericBound
Source§impl FromSchema for NumericBound
impl FromSchema for NumericBound
fn from_value(value: &SchemaValue) -> Result<Self, FromSchemaError>
Source§impl IntoSchema for NumericBound
impl IntoSchema for NumericBound
fn type_id() -> TypeId
fn register_in(builder: &mut SchemaBuilder) -> SchemaType
fn to_value(&self) -> SchemaValue
Source§impl PartialEq for NumericBound
impl PartialEq for NumericBound
Source§impl Serialize for NumericBound
impl Serialize for NumericBound
impl StructuralPartialEq for NumericBound
Auto Trait Implementations§
impl Freeze for NumericBound
impl RefUnwindSafe for NumericBound
impl Send for NumericBound
impl Sync for NumericBound
impl Unpin for NumericBound
impl UnsafeUnpin for NumericBound
impl UnwindSafe for NumericBound
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