lib.rs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 events2;
  21. pub mod heuristics;
  22. pub mod hooklist;
  23. pub mod hooks;
  24. pub mod mutations;
  25. pub mod nodes;
  26. pub mod resources;
  27. pub mod scheduler;
  28. pub mod scope;
  29. pub mod tasks;
  30. pub mod test_dom;
  31. pub mod threadsafe;
  32. pub mod util;
  33. pub mod virtual_dom;
  34. pub(crate) mod innerlude {
  35. pub(crate) use crate::bumpframe::*;
  36. pub(crate) use crate::childiter::*;
  37. pub use crate::component::*;
  38. pub use crate::context::*;
  39. pub(crate) use crate::diff::*;
  40. pub use crate::diff_stack::*;
  41. pub use crate::events::*;
  42. pub use crate::heuristics::*;
  43. pub(crate) use crate::hooklist::*;
  44. pub use crate::hooks::*;
  45. pub use crate::mutations::*;
  46. pub use crate::nodes::*;
  47. pub(crate) use crate::resources::*;
  48. pub use crate::scheduler::*;
  49. pub use crate::scope::*;
  50. pub use crate::tasks::*;
  51. pub use crate::test_dom::*;
  52. pub use crate::threadsafe::*;
  53. pub use crate::util::*;
  54. pub use crate::virtual_dom::*;
  55. pub type DomTree<'a> = Option<VNode<'a>>;
  56. pub type FC<P> = for<'a> fn(Component<'a, P>) -> DomTree<'a>;
  57. }
  58. pub use crate::innerlude::{
  59. Context, DioxusElement, DomEdit, DomTree, ElementId, EventPriority, LazyNodes, MountType,
  60. Mutations, NodeFactory, Properties, SchedulerMsg, ScopeId, SuspendedContext, TaskHandle,
  61. TestDom, ThreadsafeVirtualDom, UserEvent, VNode, VirtualDom, FC,
  62. };
  63. pub mod prelude {
  64. pub use crate::component::{fc_to_builder, Component, Fragment, Properties};
  65. pub use crate::context::Context;
  66. pub use crate::hooks::*;
  67. pub use crate::innerlude::{DioxusElement, DomTree, LazyNodes, Mutations, NodeFactory, FC};
  68. pub use crate::nodes::VNode;
  69. pub use crate::VirtualDom;
  70. }
  71. pub mod exports {
  72. //! Important dependencies that are used by the rest of the library
  73. // the foundation of this library
  74. pub use bumpalo;
  75. pub use futures_channel;
  76. }