Docs.rs
telegram-bot2-macros-0.1.3
telegram-bot2-macros 0.1.3
Permalink
Docs.rs crate page
Links
Repository
crates.io
Source
Owners
Thechi2000
Dependencies
lazy_static ^1.4.0
normal
proc-macro-error ^1.0.4
normal
proc-macro2 ^1.0.43
normal
quote ^1.0.21
normal
regex ^1.6.0
normal
syn ^1.0.99
normal
Versions
80%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
telegram_
bot2_
macros
0.1.3
All Items
Crate Items
Macros
Attribute Macros
Derive Macros
Crate
telegram_bot2_macros
Copy item path
Source
Macros
§
commands
Return a map of commands to be used by
BotBuilder::commands
daemons
Returns the daemons associated to the given functions
handlers
Returns the handler for the given function
Attribute Macros
§
bot
Builds a main around the function. It should return a BotBuilder, which will be launched by the main.
command
Define a command handler
daemon
You can setup daemons that run in the background and have access to the BotState. Daemon function are annotated with
#[daemon]
and require a
interval
parameter, which specifies the time between two calls (in seconds).
handler
Creates a generic update handler for the function
Derive Macros
§
Builder
Creates a builder for the structure. It will have the following properties:
File
Holder