Skip to main content

actix_cloud_extra/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! Extra tools for [Actix Cloud](https://github.com/MXWXZ/actix-cloud).
3//!
4//! Everything is organized in small modules, each behind a cargo feature so
5//! you only compile what you need:
6//!
7//! - `hyuuid`: [`HyUuid`], a strictly hyphenated UUID wrapper used as the universal ID type.
8//! - `api`: REST API helpers such as [`api::PageData`], [`api::PaginationParam`] and [`api::Condition`].
9//! - `entity`: SeaORM entity helpers like [`entity::VecString`] and [`entity::DefaultColumnTrait`].
10//! - `logger`: [`logger::start_logger`], a sensible default logger for Actix Cloud applications.
11//! - `seaorm`: SeaORM query helpers like [`api::SelectPage`], [`api::IntoExpr`] and [`api::Condition`].
12//! - `macros`: re-export of the proc macros (`default_repo`, `entity_id`, ...).
13//! - `utils`: [`utils::StringUtil`] and [`utils::DataUrl`] (also pulled in by `api`).
14//!
15//! Default features: `api`, `entity`, `logger`, `seaorm` and `macros`, which
16//! enable `hyuuid` and `utils` transitively.
17
18#[cfg(feature = "macros")]
19pub mod macros {
20    pub use actix_cloud_extra_macros::*;
21}
22#[cfg(feature = "api")]
23pub mod api;
24#[cfg(feature = "entity")]
25pub mod entity;
26#[cfg(feature = "hyuuid")]
27pub mod hyuuid;
28#[cfg(feature = "logger")]
29pub mod logger;
30#[cfg(feature = "utils")]
31pub mod utils;
32
33#[cfg(feature = "hyuuid")]
34pub use hyuuid::HyUuid;