API reference
The items of the hypersig crate, grouped by what they build. Each name links to its full documentation.
The complete API documentation is the rustdoc output of the same commit as this site, with every method, its signature, and its examples. The pages here list the items used most often, each with the first sentence of its doc comment, shortened where it runs long.
| Page | What it covers |
|---|---|
| Page | Page is the full HTML document for a page, with its title, its initial signals, and the runtime. |
| El | El<S> is an HTML element on a page whose signals are S. Its methods return the element, so a tree is one expression. |
| html functions | The hypersig::html module builds elements, lists, and conditional parts. |
| Signals and Sig | Signals is the trait the page's state struct implements, and Sig<S, T> is a typed reference to one of its fields. |
| Expr | Expr<S, T> is an expression over the signals of S that evaluates to a T in the browser. |
| Stmt | Stmt<S> is a statement over the signals of S that the browser runs on an event. |
| NodeRef | NodeRef<S> names an element on a page whose signals are S, for calling the element's DOM methods imperatively. |
| Action and Call | Action<S, A> is a server endpoint on the page whose signals are S, which receives arguments A. |
| Form and Validate | Form<T> holds a form's values, the values it started from, and what the visitor has done to it. Validate gives the rules that the browser and the server both evaluate. |
| Patches and Fragment | Patches<S> is what a handler returns: new signal values and re-rendered fragments, which the browser applies in order. |
| Route and Link | Route<P, Q> is a page served at a path, with path parameters P and search parameters Q. Link<S> is a link to that page. |
| RouterExt | RouterExt adds hypersig routes to an axum Router. It needs the axum feature, which is on by default. |
Styles are in hypersig::style, a module that re-exports the hypersig_style crate. See Styling and the style module.