Remove dioxus-lib, fix doc imports (#4438)

* remove dioxus lib

* inline some doc items

* fix tests

* test docs

* Fix doc tests

* Pull out dioxus/lib feature

* disable logger and devtools in library feature

* fix cargo doc

* fix cargo doc
This commit is contained in:
Evan Almloff authored and GitHub committed 2025-07-18 14:51:07 -07:00
1 parent 4cb32d372b
commit 98f7667fb4
59 files changed
+216 -530

No files matched your search

+3 -11
View File
@@ -4,7 +4,7 @@ use std::{
str::FromStr,
};
use dioxus_lib::core::{CapturedError, RenderError};
use dioxus_core::{CapturedError, RenderError};
use serde::{de::DeserializeOwned, Serialize};
use server_fn::{
codec::JsonEncoding,
@@ -33,7 +33,7 @@ pub type ServerFnResult<T = (), E = String> = std::result::Result<T, ServerFnErr
///
/// You can use the [`ServerFnError`] type in the Error type of your server function result or use the [`ServerFnResult`]
/// type as the return type of your server function. When you call the server function, you can handle the error directly
/// or convert it into a [`CapturedError`] to throw into the nearest [`ErrorBoundary`](dioxus_lib::prelude::ErrorBoundary).
/// or convert it into a [`CapturedError`] to throw into the nearest [`ErrorBoundary`](dioxus_core::ErrorBoundary).
///
/// ```rust
/// use dioxus::prelude::*;
@@ -137,16 +137,8 @@ impl ServerFnError {
/// use dioxus::prelude::*;
/// use serde::{Serialize, Deserialize};
///
/// #[derive(Serialize, Deserialize, Debug)]
/// struct MyCustomError;
/// impl std::fmt::Display for MyCustomError {
/// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
/// write!(f, "My custom error")
/// }
/// }
///
/// #[server]
/// async fn server_function() -> ServerFnResult<String, MyCustomError> {
/// async fn server_function() -> ServerFnResult<String> {
/// // Return your custom error
/// Err(ServerFnError::new("Something went wrong"))
/// }
+1 -1
View File
@@ -1,6 +1,6 @@
//! On the client, we use the [`WebDocument`] implementation to render the head for any elements that were not rendered on the server.
use dioxus_lib::document::*;
use dioxus_document::*;
use dioxus_web::WebDocument;
fn head_element_written_on_server() -> bool {