lib.rs 2.6 KB

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