1#![doc = include_str!("../README.md")]
2#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
3#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
4#![recursion_limit = "256"]
5#![warn(missing_docs)]
6#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
11
12extern crate self as dioxus_core;
16
17macro_rules! dioxus_debug_assert {
22 ($($arg:tt)*) => {{
23 #[cfg(all(debug_assertions, not(coverage_nightly)))]
24 {
25 debug_assert!($($arg)*);
26 }
27 }};
28}
29
30mod any_props;
31mod arena;
32mod diff;
33mod effect;
34mod error_boundary;
35mod events;
36mod fragment;
37mod generational_box;
38mod global_context;
39mod launch;
40mod mount;
41mod mutations;
42mod nodes;
43mod portal;
44mod properties;
45mod reactive_context;
46mod render_driver;
47mod render_error;
48mod root_wrapper;
49mod runtime;
50mod scheduler;
51mod scope_arena;
52mod scope_context;
53mod scopes;
54mod suspense;
55mod tasks;
56pub mod view;
57mod virtual_dom;
58
59mod hotreload_utils;
60
61#[doc(hidden)]
63pub mod internal {
64 pub use crate::hotreload_utils::{
65 DynamicLiteralPool, DynamicValuePool, FmtSegment, FmtedSegments, HotReloadAttributeValue,
66 HotReloadDynamicAttribute, HotReloadDynamicNode, HotReloadLiteral,
67 HotReloadTemplateWithLocation, HotReloadedTemplate, NamedAttribute, TemplateGlobalKey,
68 };
69
70 pub use anyhow::__anyhow;
71
72 pub use dioxus_core_template::{TemplateRawTree, TemplateStorage};
73
74 pub use generational_box;
75}
76
77pub(crate) mod innerlude {
78 pub(crate) use crate::any_props::*;
79 pub use crate::arena::*;
80 pub(crate) use crate::effect::*;
81 pub use crate::error_boundary::*;
82 pub use crate::events::*;
83 pub use crate::fragment::*;
84 pub use crate::generational_box::*;
85 pub use crate::global_context::*;
86 pub use crate::launch::*;
87 pub use crate::mutations::*;
88 pub use crate::nodes::*;
89 pub use crate::portal::*;
90 pub use crate::properties::*;
91 pub use crate::reactive_context::*;
92 pub use crate::render_error::*;
93 pub use crate::runtime::{Runtime, RuntimeGuard};
94 pub(crate) use crate::scheduler::*;
95 pub use crate::scopes::*;
96 pub use crate::suspense::*;
97 pub use crate::tasks::*;
98 pub use crate::virtual_dom::*;
99
100 pub use anyhow::Context as AnyhowContext;
101 pub use anyhow::anyhow;
102 pub use dioxus_core_template::Template;
103 pub type Result<T, E = CapturedError> = std::result::Result<T, E>;
108
109 pub type Element = std::result::Result<VNode, RenderError>;
113
114 pub type Component<P = ()> = fn(P) -> Element;
116}
117
118pub use crate::innerlude::{
119 AnyValue, AnyhowContext, AsyncMarker, AsyncResultMarker, Attribute, AttributeValue,
120 BorrowedAttributeValue, Callback, CapturedError, Component, ComponentBuilder,
121 ComponentBuilderOutput, ComponentBuilderRender, ComponentFunction, ComponentFunctionExt,
122 DynamicNode, DynamicValues, Element, ElementId, ErrorBoundary, ErrorContext, Event,
123 EventHandler, Fragment, HasAttributes, IntoAttributeValue, IntoDynNode, IntoVNode,
124 LaunchConfig, ListenerCallback, MarkerWrapper, MountedVNode, MultiWriter, Mutation, Mutations,
125 NoOpMutations, OptionArgumentsFromMarker, OptionCallbackMarker, OptionStringFromMarker, Portal,
126 PortalProps, Properties, ReactiveContext, RenderError, RenderTargetId, Result, Runtime,
127 RuntimeGuard, ScopeId, ScopeState, SpawnIfAsync, SubscriberList, Subscribers, SuperFrom,
128 SuperInto, SuspendedFuture, SuspenseBoundary, SuspenseBoundaryProps, SuspenseContext, Task,
129 Template, UnitClosure, VComponent, VNode, VText, VirtualDom, WriteMutations, anyhow,
130 consume_context, consume_context_from_scope, current_owner, current_scope_id, generation,
131 has_context, needs_update, needs_update_any, parent_scope, provide_context,
132 provide_create_error_boundary, provide_root_context, queue_effect, remove_future,
133 schedule_update, schedule_update_any, spawn, spawn_forever, spawn_isomorphic, suspend,
134 throw_error, try_consume_context, use_after_render, use_before_render, use_drop, use_hook,
135 use_hook_with_cleanup, with_owner,
136};
137pub use diff::template::{
138 DynamicAnchor, DynamicAttrSlot, DynamicNodeSlot, StaticElement, StaticText, VNodeChild,
139};
140
141#[allow(non_snake_case)]
160pub fn Ok<T>(value: T) -> Result<T, CapturedError> {
161 Result::Ok(value)
162}
163
164pub use const_format;