straw

Crates.iostraw
lib.rsstraw
version0.3.0
sourcesrc
created_at2016-01-24 20:22:44.683417
updated_at2016-01-31 19:26:22.761004
descriptionWIP Rust -> HTML renderer
homepage
repositoryhttps://github.com/BlakeWilliams/straw
max_upload_size
id3981
size7,785
Blake Williams (BlakeWilliams)

documentation

README

Straw

Work in progress Experimental Rust -> HTML renderer.

Installation

Add straw to Cargo.toml.

[dependencies]
straw = "*"

Usage

Import Element and Renderable and start creating Elements.

extern crate straw;

use straw::element::{Element, Renderable}
use straw::attribute::Attr;

let element = Element::new("div", vec![Attr::id("main")], vec![
  Element::new("h1", vec![], "Hello"),
  Element::new("input", vec![Attr::disabled(true)], ""),
]);

element.render(); // <div id="main"><h1>Hello</h1><input disabled></input></div>
Commit count: 11

cargo fmt