mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 19:48:50 +01:00
🤖 An elegant Telegram bots framework for Rust
https://docs.rs/teloxide
This removes the logic in the multipart serializer that unserialized `InputFile`s from serde. Now `InputFile`s are serialized either as their value (for `FileId` and `Url`) or as an `attach://<id>` string where `<id>` is replaced with some id unique for the file. The file data itself is acquired through `MultipartPayload` trait. Since the `<id>` must be the same while serializing the file with serde and while acquiring data through `MultipartPayload` trait, `InputFile` needs to store said id. As such, `InputFile` is now a structure with private fields and it's structure can't be observed by users. The only things that `InputFile` provides are - Constructors (`url`, `file_id`, `file`, `memory`) - File name setter - `Clone` and `Debug` implementations |
||
---|---|---|
.github/workflows | ||
examples | ||
media | ||
src | ||
.gitignore | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE | ||
netlify.toml | ||
README.md | ||
rust-toolchain.toml | ||
rustfmt.toml |
teloxide-core
The core part of teloxide
providing tools for making requests to the Telegram Bot API with ease. This library is fully asynchronous and built using tokio
.
teloxide-core = "0.3"
Compiler support: requires rustc 1.49+.