Skip to main content

JsBigIntOrBooleanLike

Trait JsBigIntOrBooleanLike 

Source
pub trait JsBigIntOrBooleanLike:
    IntoWasmAbi
    + Sealed
    + JsBigIntOrBooleanOrNumberLike
    + JsBigIntOrBooleanOrStringLike { }
Expand description

Marker for Rust parameter types represented by the TypeScript union bigint | boolean.

Use this trait as a bound on an experimental_generic_mono JavaScript import. Each monomorphisation retains its concrete ABI representation; this marker only restricts which Rust types may instantiate the parameter.

The union’s primitive categories use these Rust representations:

  • bigint: i64, u64, i128, u128, BigInt, and &BigInt
  • boolean: bool, Boolean, and &Boolean

This trait is experimental and may change or be removed as experimental_generic_mono evolves.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl JsBigIntOrBooleanLike for bool

Source§

impl JsBigIntOrBooleanLike for i64

Source§

impl JsBigIntOrBooleanLike for i128

Source§

impl JsBigIntOrBooleanLike for u64

Source§

impl JsBigIntOrBooleanLike for u128

Implementors§