napi-rs/crates/napi/src
Ivan Enderlin cb2a407228 feat(napi) Implement ToNapiValue for 8 and 16-bits numbers.
`napi` only supports numbers in 16 and 32-bits. To support Rust
numbers with 8 and 16-bits, we can cast them to 32-bits. To convert
from 8 and 16-bits to 32-bits, we use their `Into` implementation. To
convert from 32-bits to 8 and 16-bits, we use their `TryInto`, we
should theorically not fail, but in case of, an `except` message is
appended.

The code has also been re-indented as it was containing a mix of 2
spaces, 4 spaces and tabs identation.
2022-05-25 14:43:23 +08:00
..
bindgen_runtime feat(napi) Implement ToNapiValue for 8 and 16-bits numbers. 2022-05-25 14:43:23 +08:00
js_values
async_cleanup_hook.rs
async_work.rs
call_context.rs
cleanup_env.rs
env.rs
error.rs
lib.rs
promise.rs
status.rs
task.rs
threadsafe_function.rs
tokio_runtime.rs
value_type.rs
version.rs