Struct apollo_compiler::database::hir::Float
source · pub struct Float { /* private fields */ }
Implementations§
source§impl Float
impl Float
pub fn new(float: f64) -> Self
pub fn get(self) -> f64
sourcepub fn to_i32_checked(self) -> Option<i32>
pub fn to_i32_checked(self) -> Option<i32>
If the value is in the i32
range, convert by rounding towards zero.
(This is mostly useful when matching on Value::Int
where the value is known not to have a fractional part
so the rounding mode doesn’t affect the result.)
Trait Implementations§
source§impl PartialEq<Float> for Float
impl PartialEq<Float> for Float
impl Copy for Float
impl Eq for Float
impl StructuralEq for Float
impl StructuralPartialEq for Float
Auto Trait Implementations§
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnwindSafe for Float
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.