dioxus/packages/core/src/lib.rs

82 lines
2.3 KiB
Rust
Raw Normal View History

#![allow(non_snake_case)]
2021-07-29 22:04:09 +00:00
#![doc = include_str!("../README.md")]
2021-01-14 07:56:41 +00:00
2021-08-31 16:28:44 +00:00
/*
Navigating this crate:
- virtual_dom: the primary entrypoint for the crate
2021-09-07 22:25:57 +00:00
- scheduler: the core interior logic called by the [`VirtualDom`]
2021-08-31 16:28:44 +00: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 16:28:44 +00:00
Some utilities
*/
pub mod bumpframe;
pub mod childiter;
pub mod component;
pub mod context;
pub mod diff;
pub mod diff_stack;
pub mod events;
pub mod heuristics;
pub mod hooklist;
pub mod hooks;
pub mod mutations;
pub mod nodes;
2021-09-20 16:32:21 +00:00
pub mod resources;
2021-08-31 16:28:44 +00:00
pub mod scheduler;
pub mod scope;
2021-09-20 16:32:21 +00:00
pub mod tasks;
2021-09-02 03:57:34 +00:00
pub mod test_dom;
2021-10-01 06:07:12 +00:00
pub mod threadsafe;
2021-08-31 16:28:44 +00:00
pub mod util;
pub mod virtual_dom;
2021-02-03 07:26:04 +00:00
2021-02-12 21:11:33 +00:00
pub(crate) mod innerlude {
2021-08-31 16:28:44 +00:00
pub(crate) use crate::bumpframe::*;
pub(crate) use crate::childiter::*;
2021-05-15 16:03:08 +00:00
pub use crate::component::*;
2021-07-09 05:36:18 +00:00
pub use crate::context::*;
2021-08-31 16:28:44 +00:00
pub(crate) use crate::diff::*;
2021-08-23 14:43:49 +00:00
pub use crate::diff_stack::*;
2021-05-15 16:03:08 +00:00
pub use crate::events::*;
2021-07-15 08:17:45 +00:00
pub use crate::heuristics::*;
2021-09-01 19:45:53 +00:00
pub(crate) use crate::hooklist::*;
2021-07-27 15:28:05 +00:00
pub use crate::hooks::*;
2021-08-22 21:08:25 +00:00
pub use crate::mutations::*;
2021-05-15 16:03:08 +00:00
pub use crate::nodes::*;
2021-09-20 16:32:21 +00:00
pub(crate) use crate::resources::*;
2021-08-25 19:54:33 +00:00
pub use crate::scheduler::*;
2021-07-09 05:42:26 +00:00
pub use crate::scope::*;
2021-09-20 16:32:21 +00:00
pub use crate::tasks::*;
2021-09-02 04:10:09 +00:00
pub use crate::test_dom::*;
2021-10-01 06:07:12 +00:00
pub use crate::threadsafe::*;
2021-07-09 05:37:34 +00:00
pub use crate::util::*;
2021-05-15 16:03:08 +00:00
pub use crate::virtual_dom::*;
2021-07-18 16:39:32 +00:00
pub type DomTree<'a> = Option<VNode<'a>>;
2021-09-21 17:13:15 +00:00
pub type FC<P> = for<'a> fn(Context<'a>, &'a P) -> DomTree<'a>;
2021-07-11 23:31:07 +00:00
}
2021-02-12 05:29:46 +00:00
2021-08-31 16:28:44 +00:00
pub use crate::innerlude::{
2021-09-25 01:46:23 +00:00
Context, DioxusElement, DomEdit, DomTree, ElementId, EventPriority, LazyNodes, MountType,
Mutations, NodeFactory, Properties, ScopeId, SuspendedContext, SyntheticEvent, TaskHandle,
2021-10-01 06:07:12 +00:00
TestDom, ThreadsafeVirtualDom, UserEvent, VNode, VirtualDom, FC,
2021-08-31 16:28:44 +00:00
};
pub mod prelude {
pub use crate::component::{fc_to_builder, Fragment, Properties};
pub use crate::context::Context;
pub use crate::hooks::*;
pub use crate::innerlude::{DioxusElement, DomTree, LazyNodes, Mutations, NodeFactory, FC};
pub use crate::nodes::VNode;
pub use crate::VirtualDom;
}
2021-07-11 23:31:07 +00:00
pub mod exports {
2021-08-25 19:54:33 +00:00
//! Important dependencies that are used by the rest of the library
// the foundation of this library
pub use bumpalo;
2021-01-15 01:56:28 +00:00
}