fn serialize_i64(self, v: i64) -> Result {
        const MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_991;
        const MIN_SAFE_INTEGER: i64 = -MAX_SAFE_INTEGER;

        if v >= MIN_SAFE_INTEGER && v <= MAX_SAFE_INTEGER {
            self.serialize_f64(v as _)
        } else {
            Err(Error::custom(format_args!(
                "{} can't be represented as a JavaScript number",
                v
            )))
        }
    }
// TODO: we might want to support `BigInt` here in the future.
we might want to support `BigInt` here in the future.
we might want to support ` BigInt ` here in the future .
fn serialize_i64(self, v: i64) -> Result {
        const MAX_SAFE_INTEGER: i64 = 9_007_199_254_740_991;
        const MIN_SAFE_INTEGER: i64 = -MAX_SAFE_INTEGER;
        if v >= MIN_SAFE_INTEGER && v <= MAX_SAFE_INTEGER {
            self.serialize_f64(v as _)
        } else {
            Err(Error::custom(format_args!(
                "{} can't be represented as a JavaScript number",
                v
            )))
        }
    }
fn serialize_i64 ( self , v : i64 ) -> Result { const MAX_SAFE_INTEGER : i64 = 9_007_199_254_740_991 ; const MIN_SAFE_INTEGER : i64 = - MAX_SAFE_INTEGER ; if v >= MIN_SAFE_INTEGER && v <= MAX_SAFE_INTEGER { self . serialize_f64 ( v as _ ) } else { Err ( Error :: custom ( format_args ! ( " " v ) ) ) } }
TODO: we might want to support `BigInt` here in the future.
TODO : we might want to support ` BigInt ` here in the future .
self
v
i64