Crate tagger[][src]

This crate provides primitives to build up a html/xml/svg document programatically, as opposed to a templating type engine.

Why are these all macros?

So that the user can pass as many format arguments as desired.

Why do I have to call end!()?

This is to force the user to handle the error case of writing the end tag. If we did this in the destructor of an element, then the write could silently fail.

So we enforce that end!() was called at runtime by checking a flag in the destructor and panic if it was not called. If the destructor is called as part of unwinding, then it does nothing.

Modules

elem

Contains the structs that the element macros work with internally.

prelude

The prelude to import the element manipulation convenience macros.

svg

Contains primitives to make some svg constructs like paths and polylines.

Macros

element

Create a new element from another element.

empty_element

Create a element with no ending tag from an element.

end

Write the ending tag for an element.

new_element

Create a new element from a writer.

new_empty_element

Create a element with no ending tag.

Structs

WriterAdaptor

Used by upgrade

Functions

upgrade

Upgrade a std::io::Write to be a std::fmt::Write