pub struct Number(_);
Expand description
An SQL number (could represent an integer or floating point number).
Implementations
sourceimpl Number
impl Number
sourcepub fn to<P: FromPrimitive>(&self) -> Option<P>
pub fn to<P: FromPrimitive>(&self) -> Option<P>
Tries to convert this number into a primitive.
sourcepub fn to_sql_bool(&self) -> Option<bool>
pub fn to_sql_bool(&self) -> Option<bool>
Converts this number into a nullable boolean using SQL rule.
Trait Implementations
sourceimpl PartialOrd<Number> for Number
impl PartialOrd<Number> for Number
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl<'s> TryFromValue<'s> for Number
impl<'s> TryFromValue<'s> for Number
impl Copy for Number
Auto Trait Implementations
impl RefUnwindSafe for Number
impl Send for Number
impl Sync for Number
impl Unpin for Number
impl UnwindSafe for Number
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more