dioxus/packages/core/src/lib.rs

65 lines
1.9 KiB
Rust
Raw Normal View History

#![allow(non_snake_case)]
2021-07-29 18:04:09 -04:00
#![doc = include_str!("../README.md")]
2021-01-14 02:56:41 -05:00
2021-08-31 12:28:44 -04:00
/*
Navigating this crate:
- virtual_dom: the primary entrypoint for the crate
2021-09-07 18:25:57 -04:00
- scheduler: the core interior logic called by the [`VirtualDom`]
2021-08-31 12:28:44 -04:00
- nodes: the definition of VNodes, listeners, etc.
- diff: the stackmachine-based diffing algorithm
- hooks: foundational hooks that require crate-private APIs
- mutations: DomEdits/NodeRefs and internal API to create them
2021-08-31 12:28:44 -04:00
Some utilities
*/
pub(crate) mod component;
pub(crate) mod diff;
pub(crate) mod diff_stack;
pub(crate) mod hooklist;
pub(crate) mod lazynodes;
pub(crate) mod mutations;
pub(crate) mod nodes;
pub(crate) mod scope;
pub(crate) mod scopearena;
pub(crate) mod virtual_dom;
2021-02-03 02:26:04 -05:00
2021-02-12 16:11:33 -05:00
pub(crate) mod innerlude {
2021-05-15 12:03:08 -04:00
pub use crate::component::*;
2021-08-31 12:28:44 -04:00
pub(crate) use crate::diff::*;
2021-08-23 10:43:49 -04:00
pub use crate::diff_stack::*;
2021-09-01 15:45:53 -04:00
pub(crate) use crate::hooklist::*;
2021-11-01 02:41:23 -04:00
pub use crate::lazynodes::*;
2021-08-22 17:08:25 -04:00
pub use crate::mutations::*;
2021-05-15 12:03:08 -04:00
pub use crate::nodes::*;
2021-07-09 01:42:26 -04:00
pub use crate::scope::*;
pub use crate::scopearena::*;
2021-05-15 12:03:08 -04:00
pub use crate::virtual_dom::*;
2021-11-01 02:41:23 -04:00
2021-11-06 23:11:17 -04:00
pub type Element = Option<NodeLink>;
pub type FC<P> = for<'a> fn(Context<'a>, &'a P) -> Element;
2021-07-11 19:31:07 -04:00
}
2021-02-12 00:29:46 -05:00
2021-08-31 12:28:44 -04:00
pub use crate::innerlude::{
Attribute, Context, DioxusElement, DomEdit, Element, ElementId, EventPriority, IntoVNode,
LazyNodes, Listener, MountType, Mutations, NodeFactory, Properties, SchedulerMsg,
ScopeChildren, ScopeId, UserEvent, VAnchor, VElement, VFragment, VNode, VSuspended, VirtualDom,
FC,
2021-08-31 12:28:44 -04:00
};
pub mod prelude {
pub use crate::component::{fc_to_builder, Fragment, Properties};
pub use crate::innerlude::Context;
pub use crate::innerlude::{
DioxusElement, Element, LazyNodes, NodeFactory, Scope, ScopeChildren, FC,
};
2021-08-31 12:28:44 -04:00
pub use crate::nodes::VNode;
pub use crate::VirtualDom;
}
2021-07-11 19:31:07 -04:00
pub mod exports {
2021-08-25 15:54:33 -04:00
//! Important dependencies that are used by the rest of the library
// the foundation of this library
pub use bumpalo;
2021-10-04 01:28:04 -04:00
pub use futures_channel;
2021-01-14 20:56:28 -05:00
}