pub struct FloatLiteral {
pub fragment: Fragment,
pub value: f64,
}Available on crate feature
ast-models only.Expand description
A floating point literal from source, such as 1.5 or 2e-3. Like IntegerLiterals, these are never negative.
Fields§
§fragment: FragmentThe Fragment of source code containing this float literal.
value: f64The value of the float (parsed at the highest available precision – type checking decides whether this is
an f32 or an f64).
Trait Implementations§
Source§impl Clone for FloatLiteral
impl Clone for FloatLiteral
Source§impl Debug for FloatLiteral
impl Debug for FloatLiteral
Source§impl PartialEq for FloatLiteral
impl PartialEq for FloatLiteral
impl StructuralPartialEq for FloatLiteral
Auto Trait Implementations§
impl Forget for FloatLiteral
impl Freeze for FloatLiteral
impl RefUnwindSafe for FloatLiteral
impl Send for FloatLiteral
impl Sync for FloatLiteral
impl Unpin for FloatLiteral
impl UnsafeUnpin for FloatLiteral
impl UnwindSafe for FloatLiteral
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more