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, Callback,
120 CapturedError, Component, ComponentBuilder, ComponentBuilderOutput, ComponentBuilderRender,
121 ComponentFunction, ComponentFunctionExt, DynamicNode, DynamicValues, Element, ElementId,
122 ErrorBoundary, ErrorContext, Event, EventHandler, Fragment, HasAttributes, IntoAttributeValue,
123 IntoDynNode, IntoVNode, LaunchConfig, ListenerCallback, MarkerWrapper, MountedVNode,
124 MultiWriter, Mutation, Mutations, NoOpMutations, OptionArgumentsFromMarker,
125 OptionCallbackMarker, OptionStringFromMarker, Portal, PortalProps, Properties, ReactiveContext,
126 RenderError, RenderTargetId, Result, Runtime, RuntimeGuard, ScopeId, ScopeState, SpawnIfAsync,
127 SubscriberList, Subscribers, SuperFrom, SuperInto, SuspendedFuture, SuspenseBoundary,
128 SuspenseBoundaryProps, SuspenseContext, Task, Template, UnitClosure, VComponent, VNode, VText,
129 VirtualDom, WriteMutations, anyhow, consume_context, consume_context_from_scope, current_owner,
130 current_scope_id, generation, has_context, needs_update, needs_update_any, parent_scope,
131 provide_context, provide_create_error_boundary, provide_root_context, queue_effect,
132 remove_future, schedule_update, schedule_update_any, spawn, spawn_forever, spawn_isomorphic,
133 suspend, throw_error, try_consume_context, use_after_render, use_before_render, use_drop,
134 use_hook, use_hook_with_cleanup, with_owner,
135};
136pub use diff::template::{
137 DynamicAnchor, DynamicAttrSlot, DynamicNodeSlot, StaticElement, StaticText, VNodeChild,
138};
139
140#[allow(non_snake_case)]
159pub fn Ok<T>(value: T) -> Result<T, CapturedError> {
160 Result::Ok(value)
161}
162
163pub use const_format;