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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
#![allow(clippy::missing_const_for_fn)]
#![allow(clippy::module_name_repetitions)]
//! ## Starting A New Project
//!
//! To start a new project, you can use cargo-generate:
//!
//! ```sh
//! cargo install loco-cli
//! ❯ loco new
//! ✔ ❯ App name? · myapp
//! ? ❯ What would you like to build? ›
//! ❯ lightweight-service (minimal, only controllers and views)
//! Rest API (with DB and user auth)
//! SaaS app (with DB and user auth)
//! ```
//!
//! ## Available Features
//!
//! To avoid compiling unused dependencies, loco gates certain features.
//!
//! | Feature | Default | Description |
//! |------------|---------|-----------------------------|
//! | `auth_jwt` | true | Enable user authentication. |
//! | `cli` | true | Expose Cli commands. |
//! | `testing | false | Test Utilities Module. |
//! | `with-db` | true | with-db. |
//! | `channels` | false | Enable socket channels. |
pub use self::errors::Error;
mod banner;
pub mod prelude;
#[cfg(feature = "with-db")]
pub mod doctor;
#[cfg(feature = "with-db")]
pub mod db;
#[cfg(feature = "with-db")]
pub mod model;
#[cfg(feature = "with-db")]
pub mod schema;
mod tera;
pub mod app;
#[cfg(feature = "cli")]
pub mod cli;
pub mod auth;
pub mod boot;
pub mod concern;
pub mod config;
pub mod controller;
pub mod environment;
pub mod errors;
mod gen;
pub mod hash;
mod logger;
pub mod mailer;
mod redis;
pub mod task;
#[cfg(feature = "testing")]
pub mod testing;
#[cfg(feature = "testing")]
pub use axum_test::TestServer;
pub mod storage;
pub mod validation;
pub mod worker;
#[cfg(feature = "channels")]
pub use socketioxide;
#[cfg(feature = "testing")]
pub mod tests_cfg;
pub use validator;
/// Application results options list
pub type Result<T, E = Error> = std::result::Result<T, E>;