Crate telers

Source

Re-exports§

pub use client::Bot;
pub use context::Context;
pub use dispatcher::Builder as DispatcherBuilder;
pub use dispatcher::Dispatcher;
pub use extensions::Extension;
pub use extensions::Extensions;
pub use extractor::Extractor;
pub use filters::Filter;
pub use fsm::Context as FSMContext;
pub use request::Request;
pub use router::Configured as RouterConfigured;
pub use router::Router;

Modules§

client
This module contains submodules with components for sending requests to the Telegram Bot API, its conguration and the main entry point for the library - the Bot struct.
context
Context is a type that is used to transmit data between processing-units when propagating an event. Context creates at the start of the event propagation by Dispatcher and pass to every processing-unit. Processing-units can add their own data to context and use data from context that was added by others.
dispatcher
Dispatcher is the main part of the library, which contains functionality for handling updates and dispatching them to the router. You can create Dispatcher using Builder.
enums
This module contains enums used in the library for simple way to use it instead of strings (constants), which not so comfortable and safe, because you can make a typo in string and it will compile without errors.
errors
This module contains errors that can be returned by the library.
event
extensions
Extension is a type that is used to transmit data between processing-units when propagating an event. Extensions creates at the start of the event propagation by Dispatcher and pass to every processing-unit. Processing-units can add their own data to extension and use data from extension that was added by others.
extractor
This module contains functionality for extracting data to the handler arguments.
filters
Filters are main part of the library used to filter incoming updates and allow call handlers by their data (text, chat, user, command, state, db, etc.) and other conditions.
fsm
This module contains the implementations of the finite state machine.
methods
This module contains telegram methods from the Telegram Bot API. Each method has a description and a link to the official documentation.
middlewares
This module contains inner and outer middlewares.
request
router
Router combines all event observers.
types
This module contains telegram types from the Telegram Bot API. Each type has a description and a link to the official documentation, but we recommend to use documentation instead of description (docs copy-paste) because it has actual info
utils

Derive Macros§

FromContext
Derive an implementation of Extractor for the given type.
FromEvent
Derive an implementation of Extractor for the given type.