Expand description
§ferrum-email-render
The rendering engine for Ferrum Email.
This crate takes Component implementations, calls their render() methods to
produce Node trees, and converts those trees into:
- HTML — email-safe HTML with all CSS inlined as
style=""attributes - Plain text — extracted from text nodes with sensible formatting
§Rendering Pipeline
Component::render() → Node tree
↓
CSS Inliner (all styles → inline style="" attrs)
↓
HTML Emitter (produces final HTML string)
↓
Text Extractor (produces plain text fallback)§Usage
use ferrum_email_render::Renderer;
use ferrum_email_core::Component;
let renderer = Renderer::default();
let email = MyEmail;
let html = renderer.render_html(&email).unwrap();
let text = renderer.render_text(&email).unwrap();Re-exports§
pub use renderer::RenderConfig;pub use renderer::Renderer;
Modules§
- css_
inliner - CSS inlining for email-safe rendering.
- html_
emitter - HTML string building utilities — entity escaping and tag emission.
- renderer
- The core renderer — walks a Node tree and emits email-safe HTML.
- text_
extractor - Plain text extraction from a Node tree.
Enums§
- Render
Error - Errors that can occur during rendering.