Crate carapax

Source
Expand description

A Telegram Bot framework

Modules§

accessaccess
Access control
api
An HTTP client implementation
dialoguedialogue
Dialogue support
handler
Update handlers
ratelimitratelimit
Ratelimit support
sessionsession
Session support
types
Telegram Bot API types

Structs§

App
The main entry point.
Chain
Represents a chain of handlers.
CommandPredicate
Allows to run a handler only for a specific command.
Context
A shared state storage for use in crate::Handler trait implementations.
ErrorDecorator
Allows to process an error returned by a handler.
HandlerError
An error returned by a Handler trait implementation.
HandlerInput
An input for a Handler trait implementations.
Predicate
Decorates a handler with a predicate, allowing control over whether the handler should run.
Ref
A link to a value of type T stored in the Context.

Enums§

ChainResult
A specialized result for the Chain handler.
ConvertInputError
An error when converting a HandlerInput.
PredicateOutput
Output of the predicate decorator
PredicateResult
Represents a result of a predicate.

Traits§

CommandExt
Provides a shortcut for wrapping a Handler by a CommandPredicate.
ErrorExt
Provides a shortcut for creating error decorator.
ErrorHandler
Allows to process errors returned by handlers.
Handler
Allows to handle a specific HandlerInput.
IntoHandlerResult
Converts objects into the HandlerResult.
PredicateExt
Provides a shortcut for wrapping a Handler by a Predicate.
TryFromInput
Allows to create a specific handler input.

Type Aliases§

HandlerResult
A result returned by a Handler trait implementation.