pub enum BigIntBehavior {
Number,
BigInt,
String,
}Expand description
How u64 / i64 / usize / isize are rendered in TypeScript.
JavaScript number is a double-precision float; values above 2^53 lose
precision. Consumers who need to send arbitrarily large integers over the
wire pick BigIntBehavior::BigInt (TS bigint literal type) or
BigIntBehavior::String (string-serialized integers). Default is
BigIntBehavior::Number to match the OF-014 spike’s effective behavior
and what most consumers expect.
Variants§
Number
Render as TS number. Default. May silently truncate above 2^53.
BigInt
Render as TS bigint. Requires the consumer to use bigint literals.
String
Render as TS string. Wire payload becomes a JSON string; consumers
parse it themselves.
Trait Implementations§
Source§impl Clone for BigIntBehavior
impl Clone for BigIntBehavior
Source§fn clone(&self) -> BigIntBehavior
fn clone(&self) -> BigIntBehavior
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 moreimpl Copy for BigIntBehavior
Source§impl Debug for BigIntBehavior
impl Debug for BigIntBehavior
Source§impl Default for BigIntBehavior
impl Default for BigIntBehavior
Source§fn default() -> BigIntBehavior
fn default() -> BigIntBehavior
Returns the “default value” for a type. Read more
impl Eq for BigIntBehavior
Source§impl PartialEq for BigIntBehavior
impl PartialEq for BigIntBehavior
impl StructuralPartialEq for BigIntBehavior
Auto Trait Implementations§
impl Freeze for BigIntBehavior
impl RefUnwindSafe for BigIntBehavior
impl Send for BigIntBehavior
impl Sync for BigIntBehavior
impl Unpin for BigIntBehavior
impl UnsafeUnpin for BigIntBehavior
impl UnwindSafe for BigIntBehavior
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