pub enum ConstValue {
Int(i128),
Float(f64),
Complex(f64, f64),
}Expand description
The value of an arithmetic constant expression.
Variants§
Int(i128)
An integer value, already reduced to the range of its type.
Float(f64)
A floating value.
Complex(f64, f64)
A complex value: the real part and the imaginary one, each already rounded to the component type.
Both parts are carried as f64 whatever the type is, exactly as a
float constant is; the rounding to f32 happens where the value is
stored, so that (float _Complex) 0.1 is the same number here and in
the generated code.
Trait Implementations§
Source§impl Clone for ConstValue
impl Clone for ConstValue
impl Copy for ConstValue
Source§impl Debug for ConstValue
impl Debug for ConstValue
Source§impl PartialEq for ConstValue
impl PartialEq for ConstValue
impl StructuralPartialEq for ConstValue
Auto Trait Implementations§
impl Freeze for ConstValue
impl RefUnwindSafe for ConstValue
impl Send for ConstValue
impl Sync for ConstValue
impl Unpin for ConstValue
impl UnsafeUnpin for ConstValue
impl UnwindSafe for ConstValue
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