Crate sauron

source ·
Expand description

Sauron is an web framework for creating fast and interactive client side web application, as well as server-side rendering for back-end web applications.

Re-exports

Modules

  • provides functionalities for commands to be executed by the system, such as when the application starts or after the application updates.
  • This module provides functionalities for manipulating the actual Document Object Model in the browser
  • Create events Object
  • Provides functions and macros to build html elements
  • reexport prelude from sauron core
  • Provides functions and macros to build svg elements
  • provides function and macro for html units such as px, %, em, etc.

Macros

  • Creates css using json notation
  • Create a css string using json notation and use namespace on the class selectors
  • create css using jss with namespace macro with correct indentions
  • Create css using jss macro with nice indentions
  • Quasi-quoting macro for building sauron Nodes.

Structs

  • The AnimationEvent class.
  • A generic wrapper for a closure in rust where we can transform and pass around.
  • A node along with all of the closures that were created for that node’s events and all of it’s child node’s events.
  • a Patch where the virtual nodes are all created in the document. This is necessary since the CreatedNode doesn’t contain references as opposed to Patch which contains reference to the vdom, which makes it hard to be included in a struct
  • Effects is a convenient way to group Msg for component to execute subsequent updates based on certain conditions. This can be used for doing animation and incremental changes to the view to provide an effect of transition or animation.
  • The HashChangeEvent class.
  • Provides functions for doing http network request
  • a custom InputEvent to contain the input string value
  • The KeyboardEvent class.
  • Contains the time it took for the last app update call for the component TODO: Maybe rename to Diagnostics
  • an event when a virtual Node is mounted the field node is the actual dom node where the virtual Node is created in the actual dom
  • The MouseEvent class.
  • Program handle the lifecycle of the APP
  • The TouchEvent class.
  • The TransitionEvent class.
  • Provides access to the Browser window

Enums

Constants

Traits

  • An Application is the root component of your program. Everything that happens in your application is done here.
  • A component has a view and can update itself.
  • A Container have children that is set from the parent component
  • a trait for implementing CustomElement in the DOM with custom tag
  • This trait is used in the DomUpdater to call the dispatch method when an event occured
  • render node, elements to a writable buffer

Functions

Type Definitions

  • Attribute type used in sauron where the type of the Attribute name is &’static str
  • alias Cmd to use Program as the APP
  • Element type with tag and attribute name type set to &’static str
  • Callback where Event type is supplied for Components
  • A simplified version of saurdon_vdom node, where we supplied the type for the tag which is a &’static str. The missing type is now only MSG which will be supplied by the users App code.
  • Patch as result of diffing the current_vdom and the new vdom. The tag and attribute name types is set to &’static str