Module prelude

Source
Expand description

A prelude of commonly used items in dioxus-fullstack.

Re-exports§

pub use server_fn::ServerFn as _;
pub use server_fn;

Structs§

StreamingContext
The context dioxus fullstack provides for the status of streaming responses on the server

Enums§

ServerFnError
A type that can be used as the return type of the server function for easy error conversion with ? operator. This type can be replaced with any other error type that implements FromServerFnError.
StreamingStatus
The status of the streaming response

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.
use_server_cached
This allows you to send data from the server to the client. The data is serialized into the HTML on the server and hydrated on the client.
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.

Attribute Macros§

server
Declares that a function is a server function. This means that its body will only run on the server, i.e., when the ssr feature is enabled on this crate.