Crate sauron_core

source ·
Expand description

The core components of sauron

Re-exports

Modules

  • This module provides functionalities for manipulating the actual Document Object Model in the browser
  • Provides functions and macros to build html elements
  • Provides functions and macros to build svg elements
  • provides function and macro for html units such as px, %, em, etc.
  • vdom stands for virtual-dom. This module contains types that are derived from mt-dom where we assign concrete types into the generics.

Macros

  • declare a function with the name corresponds to attribute name for easy usage in html elements Example:
  • creates a key attribute using a formatter
  • Creat a style attribute
  • creates a text node using a formatter

Structs

  • A handle to both a closure in Rust as well as JS closure which will invoke the Rust closure.
  • Convenience type for use on exported fn() -> Result<T, JsError> functions, where you wish to throw a JavaScript Error object.
  • Representation of an object owned by JS.

Traits

  • Add mapping function for Attribute
  • Add mapping function for Element
  • A trait for checked and unchecked casting between JS types.
  • Add mapping function for Node, Element, Attribute,
  • render node, elements to a writable buffer
  • An extension trait for Option<T> and Result<T, E> for unwrapping the T value, or throwing a JS error if it is not available.

Functions

Attribute Macros