1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! This allows users to include everything they need with a single `use` statement.
//!
//! # Re-exports
//!
//! * `Req`: A struct that represents a request from a user.
//! * `Res`, `SendResult`: A struct and a type alias that represent a response that can be sent to a user.
//! * `Button`, `Data`, `GenericElement`, `GenericModel`, `GetStartedModel`, `MediaModel`, `Payload`, `PersistentMenuModel`, `QuickReply`, `QuickReplyModel`, `SenderActionModel`, `TextModel`, `ResponseModel`: Various response models that can be sent to a user.
//!
//! # Examples
//!
//! Using the `prelude` module to include everything needed for a basic application:
//!
//! ```rust
//! use russenger::prelude::*;
//!
//! async fn index (res: Res, req: Req) -> Result<()> {
//! let message: String = req.data.get_value()?;
//! if message == "Hi" {
//! res.send(TextModel::new(&req.user, "Hello, welcome to our bot!")).await?;
//! }
//!
//! Ok(())
//! }
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! App::init().await?
//! .attach(Router::new().add("/", index))
//! .launch().await?;
//! Ok(())
//! }
//! ```
pub use crate;
pub use crate;
pub use crate;
pub use craterouter;
pub use crate;
pub use crateApp;