actix_treblle/
lib.rs

1//! Treblle.com connector for Rust Actix web framework.
2//!
3//! ## Stay in tune with your APIs
4//!
5//! Treblle makes it super easy to understand what's going on with your APIs and the apps that use them.
6//!
7//! ## With Treblle
8//!
9//! - Auto-generated and updated docs
10//! - Self service integration support
11//! - Get in-depth API insights
12//! - 90% less meetings
13//! - Complete API analytics
14//! - Complete picture of your API
15//! - 1 single awesome service
16//! - Know exactly what's ok and what not
17//! - Quality score of your API
18//! - 1 click testing
19//! - Device detection
20//! - Endpoint grouping
21//!
22//! # Installation
23//!
24//! Go to [Treblle.com](https://treblle.com/) register and create a project, copy your `project_id` and go and get your `api_key` from settings.
25//!
26//! Add this crate to your Rust Actix v4 powered application as a regular middleware, give it `project_id` and `api_key`, turn on the [features you might need](https://docs.rs/actix-treblle/latest/actix_treblle/struct.Treblle.html)
27//! and thats it! Watch your requests get logged in Treblle project.
28//!
29//! Example:
30//!
31//! ```rust,ignore
32//! use actix_web::{App, HttpServer};
33//! use actix_treblle::Treblle;
34//!
35//! #[actix_web::main]
36//! async fn main() -> std::io::Result<()> {
37//!    HttpServer::new(|| {
38//!        App::new()
39//!            .wrap(Treblle::new("project_id".to_string(), "api_key".to_string()))
40//!            .route("/hello", web::get().to(|| async { "Hello World!" }))
41//!    })
42//!    .bind(("127.0.0.1", 8080))?
43//!    .run()
44//!    .await
45//! }
46//! ```
47mod extractors;
48mod middleware;
49mod payload;
50mod treblle;
51
52pub use treblle::Treblle;