Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Without "arbitrary_precision" enabled, what can Value::Number be? #1218

Open
JPRomer0 opened this issue Nov 20, 2024 · 0 comments
Open

Without "arbitrary_precision" enabled, what can Value::Number be? #1218

JPRomer0 opened this issue Nov 20, 2024 · 0 comments

Comments

@JPRomer0
Copy link

JPRomer0 commented Nov 20, 2024

So in the code(number.rs), when "arbitrary_precision" feature is enabled, this is the Number representation, it seems.

#[cfg(not(feature = "arbitrary_precision"))]
#[derive(Copy, Clone)]
enum N {
    PosInt(u64),
    /// Always less than zero.
    NegInt(i64),
    /// Always finite.
    Float(f64),
}

The question is, is it an API level gurantee that running one of:
is_u64()
is_i64()
is_f64()
will return true or is it just the case at the moment?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant