laravel_rust_devtools/lib.rs
1//! Developer tools for [Laravel for Rust](https://laravel.com/rust) applications.
2//!
3//! A floating toolbar for applications in development: a pill at the bottom of each page with its
4//! last request, and a panel with the history of the application's requests, console commands,
5//! queued jobs and scheduled tasks, each with its timeline, queries, log lines, outgoing HTTP,
6//! cache, mail and errors, built on the spans the framework already emits. The crate's README
7//! describes what the panel shows and who sees it.
8//!
9//! An application registers the [`DevtoolsServiceProvider`]. In local development only, as
10//! [`DevtoolsConfig`] allows, it records each request, console command, queued job, scheduled task,
11//! workflow step and tick as a trace into `storage/devtools`, which the application's processes
12//! share, marks each page with its trace for whoever may see the developer tools, adds the pill's
13//! script to their pages, and serves the panel at `/_devtools` and the traces under
14//! `/_devtools/api`. A [`DevtoolsGate`] decides who that is, beyond the provider's own rules. These
15//! three are the crate's whole API.
16#![warn(
17 missing_docs,
18 unreachable_pub,
19 clippy::missing_errors_doc,
20 clippy::must_use_candidate,
21 rustdoc::missing_crate_level_docs
22)]
23
24#[cfg(debug_assertions)]
25mod collector;
26#[cfg(debug_assertions)]
27mod file_store;
28mod gate;
29#[cfg(debug_assertions)]
30mod http;
31mod provider;
32#[cfg(debug_assertions)]
33mod store;
34#[cfg(test)]
35mod tests;
36#[cfg(debug_assertions)]
37mod trace;
38
39pub use gate::DevtoolsGate;
40pub use provider::{DevtoolsConfig, DevtoolsServiceProvider};