Module uniffi::ffi

Expand description

Types that can cross the FFI boundary.

Modules

  • Callback interfaces are traits specified in UDL which can be implemented by foreign languages.
  • FfiDefault trait
  • This module contains code to handle foreign callbacks - C-ABI functions that are defined by a foreign language, then registered with UniFFI. These callbacks are used to implement callback interfaces, async scheduling etc. Foreign callbacks are registered at startup, when the foreign code loads the exported library. For each callback type, we also define a “cell” type for storing the callback.
  • This module defines a Rust Future that wraps an async foreign function call.
  • Low-level support for calling rust functions

Structs

  • Support for reading a slice of foreign-language-allocated bytes over the FFI.
  • Perform a call to a foreign async method C struct that represents the foreign future.
  • C struct that represents the result of a foreign future
  • Object handle
  • Support for passing an allocated-by-Rust buffer of bytes over the FFI.
  • Represents the success/error of a rust call
  • Used when internal/unexpected error happened when calling a foreign callback, for example when a unknown exception is raised

Enums

Traits

Functions

Type Definitions