Expand description
LingXia Messaging System
Provides two core functionalities for cross-platform communication:
- A flexible callback registry that supports oneshot, stream, and handler callbacks.
- A publish-subscribe system for system-wide events.
Structs§
- Event
- Represents a system-wide event.
Enums§
- Callback
Result - Callback result from platform
Functions§
- get_
callback - Register a oneshot callback and get its receiver.
- get_
stream_ callback - Register a stream callback and get its receiver.
- invoke_
callback - Invoke callback (called from platform code) to send result back.
- publish
- Publish an event to all subscribers.
- register_
handler - Register a handler callback. The handler is executed immediately on the thread
that calls
invoke_callbackwith the returned ID. Useremove_callback(id)to unregister when no longer needed. - remove_
callback - Remove callback by ID. This is useful for cancellation or timeout scenarios.
- subscribe
- Subscribe to a named event.