mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +01:00
Describe the cargo features in README.md
This commit is contained in:
parent
a1d8f65c64
commit
da47444e70
1 changed files with 15 additions and 3 deletions
18
README.md
18
README.md
|
@ -22,18 +22,19 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
- [Features](https://github.com/teloxide/teloxide#features)
|
- [Highlights](https://github.com/teloxide/teloxide#highlights)
|
||||||
- [Setting up your environment](https://github.com/teloxide/teloxide#setting-up-your-environment)
|
- [Setting up your environment](https://github.com/teloxide/teloxide#setting-up-your-environment)
|
||||||
- [API overview](https://github.com/teloxide/teloxide#api-overview)
|
- [API overview](https://github.com/teloxide/teloxide#api-overview)
|
||||||
- [The ping-pong bot](https://github.com/teloxide/teloxide#the-ping-pong-bot)
|
- [The ping-pong bot](https://github.com/teloxide/teloxide#the-ping-pong-bot)
|
||||||
- [Commands](https://github.com/teloxide/teloxide#commands)
|
- [Commands](https://github.com/teloxide/teloxide#commands)
|
||||||
- [Dialogues management](https://github.com/teloxide/teloxide#dialogues-management)
|
- [Dialogues management](https://github.com/teloxide/teloxide#dialogues-management)
|
||||||
- [Recommendations](https://github.com/teloxide/teloxide#recommendations)
|
- [Recommendations](https://github.com/teloxide/teloxide#recommendations)
|
||||||
|
- [Cargo features](https://github.com/teloxide/teloxide#cargo-features)
|
||||||
- [FAQ](https://github.com/teloxide/teloxide#faq)
|
- [FAQ](https://github.com/teloxide/teloxide#faq)
|
||||||
- [Community bots](https://github.com/teloxide/teloxide#community-bots)
|
- [Community bots](https://github.com/teloxide/teloxide#community-bots)
|
||||||
- [Contributing](https://github.com/teloxide/teloxide#contributing)
|
- [Contributing](https://github.com/teloxide/teloxide#contributing)
|
||||||
|
|
||||||
## Features
|
## Highlights
|
||||||
|
|
||||||
- **Functioal reactive design.** teloxide has [functional reactive design], allowing you to declaratively manipulate streams of updates from Telegram using filters, maps, folds, zips, and a lot of [other adaptors].
|
- **Functioal reactive design.** teloxide has [functional reactive design], allowing you to declaratively manipulate streams of updates from Telegram using filters, maps, folds, zips, and a lot of [other adaptors].
|
||||||
|
|
||||||
|
@ -378,9 +379,20 @@ async fn handle_message(cx: UpdateWithCx<Message>, dialogue: Dialogue) -> Transi
|
||||||
// Your logic here...
|
// Your logic here...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The second one produces very strange compiler messages because of the `#[tokio::main]` macro. However, the examples in this README use the second variant for brevity.
|
The second one produces very strange compiler messages because of the `#[tokio::main]` macro. However, the examples in this README use the second variant for brevity.
|
||||||
|
|
||||||
|
## Cargo features
|
||||||
|
|
||||||
|
- `redis-storage` -- enables the [Redis] support.
|
||||||
|
- `cbor-serializer` -- enables the [CBOR] serializer for dialogues.
|
||||||
|
- `bincode-serializer` -- enables the [Bincode] serializer for dialogues.
|
||||||
|
- `frunk` -- enables [`teloxide::utils::UpState`], which allows mapping from a structure of `field1, ..., fieldN` to a structure of `field1, ..., fieldN, fieldN+1`.
|
||||||
|
|
||||||
|
[CBOR]: https://en.wikipedia.org/wiki/CBOR
|
||||||
|
[Bincode]: https://github.com/servo/bincode
|
||||||
|
[`teloxide::utils::UpState`]: https://docs.rs/teloxide/latest/teloxide/utils/trait.UpState.html
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
Q: Where I can ask questions?
|
Q: Where I can ask questions?
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue