Crate rinf

Source

Macros§

debug_print
Delegates the printing operation to Flutter, which excels at handling various platforms including web and mobile emulators. When debugging, using this macro is recommended over println!, as it seamlessly adapts to different environments. Note that this macro does nothing in release mode.
write_interface
Writes the interface code needed to communicate with Dart. This should be used once, and only once, at the root of the hub crate.

Structs§

DartSignalPack
This contains a message from Dart. Optionally, a custom binary called binary can also be included.
SignalReceiver
The SignalReceiver is used to asynchronously receive messages from the shared message queue. Only one receiver can be active at a time; new receivers are created by cloning the original. When a receiver is cloned, it becomes the active receiver, and the previous receiver will no longer receive messages.
SignalSender
The SignalSender is used to send messages into a shared message queue. It is clonable, and multiple senders can be created to send messages into the same queue. Each message is sent to a receiver, but only the currently active receiver can receive messages.

Enums§

AppError

Traits§

DartSignal
Capability of sending signals from Dart to Rust.
DartSignalBinary
Capability of sending signals from Dart to Rust with binary data.
RustSignal
Capability of sending signals from Rust to Dart.
RustSignalBinary
Capability of sending signals from Rust to Dart with binary data.
SignalPiece
Enables a type to be nested within a signal struct or enum.

Functions§

dart_shutdown
Retrieves the shutdown receiver that listens for the Dart runtime’s closure. Awaiting this receiver in the async main Rust function is necessary to prevent the async runtime in Rust from finishing immediately.

Derive Macros§

DartSignal
Marks the struct as a signal endpoint that contains a message from Dart to Rust. This can be marked on any type that implements Deserialize.
DartSignalBinary
Marks the struct as a signal endpoint that contains a message and binary from Dart to Rust. This can be marked on any type that implements Deserialize.
RustSignal
Marks the struct as a signal endpoint that contains a message from Rust to Dart. This can be marked on any type that implements Serialize.
RustSignalBinary
Marks the struct as a signal endpoint that contains a message and binary from Rust to Dart. This can be marked on any type that implements Serialize.
SignalPiece
Marks the struct as a signal that can be nested within other signals. A SignalPiece cannot be sent independently and is only a partial component of DartSignal or RustSignal.