pub struct FloatLit {
pub value: f64,
pub suffix: FloatSuffix,
pub imaginary: bool,
pub hex: bool,
pub text: String,
}Expand description
A decoded floating constant.
Fields§
§value: f64The value, rounded to f64.
suffix: FloatSuffixThe suffix, which fixes the constant’s type.
imaginary: boolWhether the constant carried GNU’s imaginary suffix, i or j.
2.0i is (0, 2) of the complex type FloatLit::suffix names the
real part of, which is what makes 1.0 + 2.0i read the way every C
program writes a complex constant. It is a GNU extension that C11
blessed by giving <complex.h> a CMPLX built on it; the standard
spelling of the same thing is _Complex_I.
hex: boolWhether the constant was written in hexadecimal form.
text: StringThe exact source spelling.
Trait Implementations§
impl StructuralPartialEq for FloatLit
Auto Trait Implementations§
impl Freeze for FloatLit
impl RefUnwindSafe for FloatLit
impl Send for FloatLit
impl Sync for FloatLit
impl Unpin for FloatLit
impl UnsafeUnpin for FloatLit
impl UnwindSafe for FloatLit
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