Expand description
Provides struct and functions to create a representation of a virtual node
Modules§
- builder
- provides utility function for building virtual nodes and attributes
- event
- provides struct and methods for constructing sauron event
- util
- utility functions that are not directly related to virtual node
Structs§
- Attribute
- These are the attributes of an element
- Callback
- A generic sized representation of a function that can be attached to a Node. The callback will essentially be owned by the element
- Element
- Represents the element of the virtual node
- Text
- A text virtual node representation
Enums§
- Attrib
Value - The value of this attribute with 3 variants
- Event
- A container for generic event and the common values needed for the user.
- Node
- This is the core data structure of the library.
Any tree can be represented by
Node
. TheT
is generic instead of just using plain&'static str
in order for this library to be used not only in html based widget but can also be used to represent native GUI widgets in various platforms. - Patch
- A Patch encodes an operation that modifies a real DOM element.
- Value
- Value is an abstraction of the values used in the actual backend. Html and gtk-rs have different set of compatible values therefore a need for a storage of these intermediate value is needed
Functions§
- diff
- This is a sauron html specific functionality
diff 2 nodes with attribute using
&'static str
instead of generic ATT - diff_
with_ key - Given two Node’s generate Patch’s that would turn the old virtual node’s real DOM node equivalent into the new Node’s real DOM node equivalent.