Module prelude

Module prelude 

Source

Re-exports§

pub use comet_macro_procs;
pub use futures;
pub use percy_dom;
pub use serde;
pub use serde_cbor;
pub use web_sys;
pub use wasm_bindgen;
pub use crate::core::component::*;
pub use crate::server::prelude::*;

Macros§

component
debug
Logs a message at the debug level.
error
Logs a message at the error level.
generate_cache
generate_migrations
generate_proto
generate_rpc_proto
html
info
Logs a message at the info level.
lazy_static
log
The standard logging macro.
log_enabled
Determines if a message logged at the specified level in that module will be logged.
paste
run
trace
Logs a message at the trace level.
warn
Logs a message at the warn level.

Structs§

App
Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
Closure
A handle to both a closure in Rust as well as JS closure which will invoke the Rust closure.
EventAttribFn
Box<dyn AsRef>> is our js_sys::Closure. Stored this way to allow us to store any Closure regardless of the types of its arguments.
EventName
The name of the event with the on prefix.
IntoIter
An iterator that moves out of a vector.
IterableNodes
Used by the html! macro for all braced child nodes so that we can use any type that implements Into
JsError
Convenience type for use on exported fn() -> Result<T, JsError> functions, where you wish to throw a JavaScript Error object.
JsValue
Representation of an object owned by JS.
Message
Metadata
Metadata about a log message.
MetadataBuilder
Builder for Metadata.
ParseLevelError
The type returned by from_str when the string doesn’t match any of the log levels.
PercyDom
Used for keeping a real DOM node up to date based on the current VirtualNode and a new incoming VirtualNode that represents our latest DOM state.
Rc
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
Record
The “payload” of a log message.
RecordBuilder
Builder for Record.
RefCell
A mutable memory location with dynamically checked borrow rules
RwLock
An asynchronous reader-writer lock.
SetLoggerError
The type returned by set_logger if set_logger has already been called.
Shared
VElement

Enums§

AttributeValue
The value associated with an element’s attribute.
Event
HtmlNode
Level
An enum representing the available verbosity levels of the logger.
LevelFilter
An enum representing the available verbosity level filters of the logger.
VirtualNode
When building your views you’ll typically use the html! macro to generate VirtualNode’s.

Constants§

STATIC_MAX_LEVEL
The statically resolved maximum log level.

Traits§

Deserialize
A data structure that can be deserialized from any data format supported by Serde.
JsCast
A trait for checked and unchecked casting between JS types.
Log
A trait encapsulating the operations required of a logger.
ProtoTrait
Serialize
A data structure that can be serialized into any data format supported by Serde.
UnwrapThrowExt
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.
View
A trait with common functionality for rendering front-end views.

Functions§

document
logger
Returns a reference to the logger.
max_level
Returns the current maximum log level.
set_boxed_logger
Sets the global logger to a Box<Log>.
set_logger
Sets the global logger to a &'static Log.
set_logger_racy
A thread-unsafe version of set_logger.
set_max_level
Sets the global maximum log level.
set_max_level_racy
A thread-unsafe version of set_max_level.

Attribute Macros§

__wasm_bindgen_class_marker
async_trait
db
model
rpc
sql
wasm_bindgen
A list of all the attributes can be found here: https://wasm-bindgen.github.io/wasm-bindgen/reference/attributes/index.html
watch

Derive Macros§

Deserialize
Serialize