pub struct FloatLiteral {
pub span: Span,
pub prefix: Spanned<FloatPrefix>,
pub value: NumericLiteral<OrderedFloat<f64>>,
}Fields§
§span: Span§prefix: Spanned<FloatPrefix>§value: NumericLiteral<OrderedFloat<f64>>Implementations§
Source§impl FloatLiteral
impl FloatLiteral
pub fn span(&self) -> Span
Sourcepub fn single_unspanned(
value: impl Into<NumericLiteral<OrderedFloat<f64>>>,
) -> Self
pub fn single_unspanned( value: impl Into<NumericLiteral<OrderedFloat<f64>>>, ) -> Self
Create a single-precision float literal without any span information.
Sourcepub fn double_unspanned(
value: impl Into<NumericLiteral<OrderedFloat<f64>>>,
) -> Self
pub fn double_unspanned( value: impl Into<NumericLiteral<OrderedFloat<f64>>>, ) -> Self
Create a double-precision float literal without any span information.
Trait Implementations§
Source§impl Clone for FloatLiteral
impl Clone for FloatLiteral
Source§fn clone(&self) -> FloatLiteral
fn clone(&self) -> FloatLiteral
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FloatLiteral
impl Debug for FloatLiteral
Source§impl Display for FloatLiteral
impl Display for FloatLiteral
Source§impl From<FloatLiteral> for Constant
impl From<FloatLiteral> for Constant
Source§fn from(value: FloatLiteral) -> Self
fn from(value: FloatLiteral) -> Self
Converts to this type from the input type.
Source§impl From<FloatLiteral> for Spanned<Token>
impl From<FloatLiteral> for Spanned<Token>
Source§fn from(value: FloatLiteral) -> Self
fn from(value: FloatLiteral) -> Self
Converts to this type from the input type.
Source§impl From<FloatLiteral> for Value
impl From<FloatLiteral> for Value
Source§fn from(value: FloatLiteral) -> Self
fn from(value: FloatLiteral) -> Self
Converts to this type from the input type.
Source§impl FromStr for FloatLiteral
impl FromStr for FloatLiteral
Source§impl Hash for FloatLiteral
impl Hash for FloatLiteral
Source§impl Ord for FloatLiteral
impl Ord for FloatLiteral
Source§fn cmp(&self, other: &FloatLiteral) -> Ordering
fn cmp(&self, other: &FloatLiteral) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FloatLiteral
impl PartialEq for FloatLiteral
Source§impl PartialOrd for FloatLiteral
impl PartialOrd for FloatLiteral
impl Eq for FloatLiteral
impl StructuralPartialEq for FloatLiteral
Auto Trait Implementations§
impl Freeze for FloatLiteral
impl RefUnwindSafe for FloatLiteral
impl Send for FloatLiteral
impl Sync for FloatLiteral
impl Unpin 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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.