Crate dioxus_fullstack

Crate dioxus_fullstack 

Source

Re-exports§

pub use crate::request::FromResponse;
pub use crate::request::FromResponseParts;
pub use axum_core;
pub use headers;
pub use http;
pub use reqwest;
pub use serde;
pub use magic::*;
pub use request::*;
pub use encoding::*;
pub use lazy::*;
pub use payloads::*;

Modules§

body
Re-export commonly used items from axum, http, and hyper for convenience. HTTP body utilities.
document
On the client, we use the FullstackWebDocument implementation to render the head for any elements that were not rendered on the server.
encoding
error
Error types and utilities.
extract
Re-export commonly used items from axum, http, and hyper for convenience. Types and traits for extracting data from requests.
history
A history provider for fullstack apps that is compatible with hydration.
httperror
lazy
magic
ServerFn request magical 🧙 decoders and encoders.
payloads
request
response
Re-export commonly used items from axum, http, and hyper for convenience. Types and traits for generating responses.
routing
Re-export commonly used items from axum, http, and hyper for convenience. Routing between Services and handlers.

Structs§

AnyhowMarker
ClientRequest
ClientResponse
A wrapper type over the platform’s HTTP response type.
FullstackContext
The context provided by dioxus fullstack for server-side rendering.
FullstackContextInner
HeaderMap
A set of HTTP headers
HeaderValue
Represents an HTTP header field value.
HttpError
An error type that wraps an HTTP status code and optional message.
HydrationContext
Data shared between the frontend and the backend for hydration of server functions.
Json
JSON Extractor / Response.
Loader
A Loader is a signal that represents a value that is loaded asynchronously.
LoaderHandle
Method
The Request Method (VERB)
NoContent
An empty response with 204 No Content status.
Redirect
Response that redirects the request to another location.
SerializeContextEntry
An entry into the serialized context. The order entries are created in must be consistent between the server and the client.
SerializedHydrationData
Data that was serialized on the server for hydration on the client. This includes extra information about the types and sources of the serialized data in debug mode
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Enums§

LoaderState
Loading
RequestError
An error type representing issues that can occur while making requests.
ServerFnError
The error type for the server function system. This enum encompasses all possible errors that can occur during the registration, invocation, and processing of server functions.
StreamingStatus
The status of the streaming response
TakeDataError
An error that can occur when trying to take data from the server

Statics§

GLOBAL_REQUEST_CLIENT

Traits§

ClientResponseDriver
OrHttpError
Trait to convert errors into HttpError with a given status code.
Transportable
A Transportable type can be safely transported from the server to the client, and be used for hydration. Not all types can sensibly be transported, but many can. This trait makes it possible to customize how types are transported which helps for non-serializable types like dioxus_core::CapturedError.

Functions§

clear_request_headers
Delete the extra request headers for all servers functions.
commit_initial_chunk
Commit the initial chunk of the response. This will be called automatically if you are using the dioxus router when the suspense boundary above the router is resolved. Otherwise, you will need to call this manually to start the streaming part of the response.
current_status
Get the current status of the streaming response. This method is reactive and will cause the current reactive context to rerun when the status changes.
extractDeprecated
Extract an axum extractor from the current request.
get_request_headers
Returns the extra request headers for all servers functions.
get_server_url
Returns the root server URL for all server functions.
head_element_hydration_entry
Create a new entry in the serialize context for the head element hydration
init_error_boundary
Initializes an error boundary context that is compatible with hydration.
is_hydrating
Check if the client is currently rendering a component for hydration. Always returns true on the server.
serialize_context
Get or insert the current serialize context. On the client, the hydration context this returns will always return TakeDataError::DataNotAvailable if hydration of the current chunk is finished.
set_request_headers
Set the extra request headers for all servers functions.
set_server_url
Set the root server URL that all server function paths are relative to for the client.
status_code_from_error
Convert a CapturedError into an appropriate HTTP status code.
use_loader
A hook to create a resource that loads data asynchronously.
use_server_cached
This allows you to send data from the server to the client during hydration.
use_server_future
Runs a future with a manual list of dependencies and returns a resource with the result if the future is finished or a suspended error if it is still running.

Type Aliases§

ClientResult
ServerFnResult
A default result type for server functions, which can either be successful or contain an error. The ServerFnResult type is a convenient alias for a Result type that uses ServerFnError as the error type.

Attribute Macros§

delete
get
patch
post
put
server
Usage