Module napi::bindgen_prelude

source ·

Re-exports§

  • pub use crate::assert_type_of;
  • pub use crate::check_pending_exception;
  • pub use crate::check_status;
  • pub use crate::check_status_or_throw;
  • pub use crate::error;
  • pub use crate::error;
  • pub use crate::type_of;
  • pub use crate::JsError;
  • pub use crate::Property;
  • pub use crate::PropertyAttributes;
  • pub use crate::Result;
  • pub use crate::Status;
  • pub use crate::Task;
  • pub use crate::ValueType;
  • pub use crate::Env;
  • pub use crate::JsDate as Date;
  • pub use crate::JsFunction;
  • pub use crate::sys;

Modules§

Structs§

Enums§

Traits§

Functions§

  • Runs a future to completion This is blocking, meaning that it pauses other execution until the future is complete, only use it when it is absolutely necessary, in other places use async functions instead.
  • Create a custom Tokio runtime used by the NAPI-RS. You can control the tokio runtime configuration by yourself.
  • Get C Callback from defined Rust fn
  • Get JsFunction from defined Rust fn
  • Spawns a future onto the Tokio runtime.
  • spawn_blocking on the current Tokio runtime.
  • If the feature tokio_rt has been enabled this will enter the runtime context and then call the provided closure. Otherwise it will just call the provided closure.

Type Aliases§

Attribute Macros§

  • Marks a function or static variable as a library/executable constructor. This uses OS-specific linker sections to call a specific function at load time.