Skip to main content

ferrum_email_core/
lib.rs

1//! # ferrum-email-core
2//!
3//! The foundation of the Ferrum Email framework. This crate defines the core abstractions:
4//!
5//! - **`Component`** trait — the building block for all email templates
6//! - **`Node`** tree — the intermediate representation between components and rendered HTML
7//! - **`Style`** system — type-safe CSS properties for email-safe styling
8//! - **Primitive types** — `Px`, `Color`, `Spacing`, `FontWeight`, etc.
9//!
10//! All other Ferrum Email crates depend on this one. If you're building custom
11//! components or extending the framework, this is your entry point.
12//!
13//! # Architecture
14//!
15//! ```text
16//! Component::render() → Node tree → Renderer → HTML + Plain Text
17//! ```
18//!
19//! Components produce `Node` trees. The `Node` tree is a virtual DOM-like
20//! intermediate representation that the renderer walks to produce email-safe HTML.
21
22pub mod color;
23pub mod component;
24pub mod node;
25pub mod spacing;
26pub mod style;
27pub mod types;
28
29// Re-export core types at the crate root for ergonomic use.
30pub use color::Color;
31pub use component::Component;
32pub use node::{Attr, Element, Node, Tag};
33pub use spacing::Spacing;
34pub use style::{Border, Style};
35pub use types::*;