Skip to main content

winged_rust/
prelude.rs

1//! One import that gets you from nothing to a rendered page.
2//!
3//! ```
4//! use winged_rust::prelude::*;
5//!
6//! let page = div().add_class("card").child(h1().text("Hello"));
7//! assert_eq!(page.render(), r#"<div class="card"><h1>Hello</h1></div>"#);
8//! ```
9//!
10//! This brings all 93 element constructors into scope. If that is too many names, import
11//! [`crate::elements`] and qualify them instead.
12
13pub use crate::core::{Attribute, Element, Node, Render, RenderOptions};
14pub use crate::elements::*;