https://github.com/dm-earth/favent
QSL-like event system for Rust
https://github.com/dm-earth/favent
Last synced: about 1 month ago
JSON representation
QSL-like event system for Rust
- Host: GitHub
- URL: https://github.com/dm-earth/favent
- Owner: DM-Earth
- License: gpl-3.0
- Created: 2023-03-27T11:16:23.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T14:15:52.000Z (about 2 years ago)
- Last Synced: 2025-01-22T10:36:28.836Z (3 months ago)
- Language: Rust
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Favent
This is an QSL/FAPI events inspired event system for Rust.
## Usage
Event is a place storing callbacks for this event with phases and an invoker with a default implementation. To create an event, use `new` or `new_default` functions in the `Event` struct.
Please check the `test` module for examples.
### Callbacks
You need callbacks to listen for events. When registering a callback into an event, you need to provide a phase id for implementing ordering.
### Phases
Favent use phases to order callbacks. You need to order the phases when creating an event.