sonic_rs

Trait JsonNumberTrait

Source
pub trait JsonNumberTrait: Sealed {
    // Required methods
    fn is_i64(&self) -> bool;
    fn is_u64(&self) -> bool;
    fn is_f64(&self) -> bool;
    fn as_i64(&self) -> Option<i64>;
    fn as_u64(&self) -> Option<u64>;
    fn as_f64(&self) -> Option<f64>;
}
Expand description

Number trait for both Number and RawNumber.

Required Methods§

Source

fn is_i64(&self) -> bool

Source

fn is_u64(&self) -> bool

Source

fn is_f64(&self) -> bool

Source

fn as_i64(&self) -> Option<i64>

Source

fn as_u64(&self) -> Option<u64>

Source

fn as_f64(&self) -> Option<f64>

Implementors§