pub struct NumericLiteral {
pub base: BaseNode,
pub value: f64,
pub extra: Option<NumericLiteralExtra>,
}Fields§
§base: BaseNode§value: f64§extra: Option<NumericLiteralExtra>Babel’s extra field containing the raw source text. Used to recover exact f64 values that serde_json may parse imprecisely.
Implementations§
Source§impl NumericLiteral
impl NumericLiteral
Sourcepub fn precise_value(&self) -> f64
pub fn precise_value(&self) -> f64
Get the f64 value, preferring re-parsing from extra.raw when available
to avoid serde_json float parsing precision issues.
Trait Implementations§
Source§impl Clone for NumericLiteral
impl Clone for NumericLiteral
Source§fn clone(&self) -> NumericLiteral
fn clone(&self) -> NumericLiteral
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NumericLiteral
impl Debug for NumericLiteral
Source§impl<'de> Deserialize<'de> for NumericLiteral
impl<'de> Deserialize<'de> for NumericLiteral
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NumericLiteral
impl RefUnwindSafe for NumericLiteral
impl Send for NumericLiteral
impl Sync for NumericLiteral
impl Unpin for NumericLiteral
impl UnsafeUnpin for NumericLiteral
impl UnwindSafe for NumericLiteral
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