lib.rs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #![allow(non_snake_case)]
  2. #![doc = include_str!("../README.md")]
  3. /*
  4. Navigating this crate:
  5. - virtual_dom: the primary entrypoint for the crate
  6. - scheduler: the core interior logic called by the [`VirtualDom`]
  7. - nodes: the definition of VNodes, listeners, etc.
  8. - diff: the stackmachine-based diffing algorithm
  9. - hooks: foundational hooks that require crate-private APIs
  10. - mutations: DomEdits/NodeRefs and internal API to create them
  11. Some utilities
  12. */
  13. pub mod bumpframe;
  14. pub mod childiter;
  15. pub mod component;
  16. pub mod context;
  17. pub mod diff;
  18. pub mod diff_stack;
  19. pub mod events;
  20. pub mod heuristics;
  21. pub mod hooklist;
  22. pub mod hooks;
  23. pub mod mutations;
  24. pub mod nodes;
  25. pub mod resources;
  26. pub mod scheduler;
  27. pub mod scope;
  28. pub mod tasks;
  29. pub mod test_dom;
  30. pub mod threadsafe;
  31. pub mod util;
  32. pub mod virtual_dom;
  33. pub(crate) mod innerlude {
  34. pub(crate) use crate::bumpframe::*;
  35. pub(crate) use crate::childiter::*;
  36. pub use crate::component::*;
  37. pub use crate::context::*;
  38. pub(crate) use crate::diff::*;
  39. pub use crate::diff_stack::*;
  40. pub use crate::events::*;
  41. pub use crate::heuristics::*;
  42. pub(crate) use crate::hooklist::*;
  43. pub use crate::hooks::*;
  44. pub use crate::mutations::*;
  45. pub use crate::nodes::*;
  46. pub(crate) use crate::resources::*;
  47. pub use crate::scheduler::*;
  48. pub use crate::scope::*;
  49. pub use crate::tasks::*;
  50. pub use crate::test_dom::*;
  51. pub use crate::threadsafe::*;
  52. pub use crate::util::*;
  53. pub use crate::virtual_dom::*;
  54. pub type DomTree<'a> = Option<VNode<'a>>;
  55. pub type FC<P> = for<'a> fn(Context<'a>, &'a P) -> DomTree<'a>;
  56. }
  57. pub use crate::innerlude::{
  58. Context, DioxusElement, DomEdit, DomTree, ElementId, EventPriority, LazyNodes, MountType,
  59. Mutations, NodeFactory, Properties, ScopeId, SuspendedContext, SyntheticEvent, TaskHandle,
  60. TestDom, ThreadsafeVirtualDom, UserEvent, VNode, VirtualDom, FC,
  61. };
  62. pub mod prelude {
  63. pub use crate::component::{fc_to_builder, Fragment, Properties};
  64. pub use crate::context::Context;
  65. pub use crate::hooks::*;
  66. pub use crate::innerlude::{DioxusElement, DomTree, LazyNodes, Mutations, NodeFactory, FC};
  67. pub use crate::nodes::VNode;
  68. pub use crate::VirtualDom;
  69. }
  70. pub mod exports {
  71. //! Important dependencies that are used by the rest of the library
  72. // the foundation of this library
  73. pub use bumpalo;
  74. }