[][src]Module moxie_dom::prelude

A module for glob-importing the most commonly used moxie-dom items.

Re-exports

pub use augdom::sys;
pub use crate::text;

Modules

event

Event types.

topo

topo creates a hierarchy of nested scopes represented as stable identifiers referring to the function callgraph.

Macros

mox

Accepts an XML-like expression and expands it to builder method calls.

Structs

Key

A Key offers access to a state variable. The key allows reads of the state variable through a snapshot taken when the Key was created. Writes are supported with Key::update and Key::set.

Traits

Dom

A value which implements a subset of the web's document object model.

Functions

document

Returns the current document. Panics if called outside a web document context.

memo

Memoizes init at this callsite, cloning a cached Stored if it exists and Arg is the same as when the stored value was created.

memo_state

Root a state variable at this callsite, returning a Key to the state variable. Re-initializes the state variable if the capture arg changes.

memo_with

Memoizes the provided function, caching the intermediate Stored value in memoization storage and only re-initializing it if Arg has changed since the cached value was created. Regardless of prior cached results, with is then called in to produce a return value.

once

Runs the provided expression once per topo::Id. The provided value will always be cloned on subsequent calls unless dropped from storage and reinitialized in a later Revision.

once_with

Memoizes expr once at the callsite. Runs with on every iteration.

state

Root a state variable at this callsite, returning a Key to the state variable.