Crate leptos_actix

source ·
Expand description

Provides functions to easily integrate Leptos with Actix.

For more details on how to use the integrations, see the examples directory in the Leptos repository.

Structs§

  • Allows you to override details of the HTTP response like the status code and add Headers/Cookies.
  • This struct lets you define headers and override the status of the Response from an Element or a Server Function Typically contained inside of a ResponseOptions. Setting this is useful for cookies and custom responses.

Enums§

Traits§

  • This trait allows one to pass a list of routes and a render function to Actix’s router, letting us avoid having to use wildcards or manually define all routes in multiple places.

Functions§

  • A helper to make it easier to use Actix extractors in server functions.
  • Generates a list of all routes defined in Leptos’s Router in your app. We can then use this to automatically create routes in Actix’s App without having to use wildcard matching or fallbacks. Takes in your root app Element as an argument so it can walk you app tree. This version is tailored to generated Actix compatible paths.
  • Generates a list of all routes defined in Leptos’s Router in your app. We can then use this to automatically create routes in Actix’s App without having to use wildcard matching or fallbacks. Takes in your root app Element as an argument so it can walk you app tree. This version is tailored to generated Actix compatible paths. Adding excluded_routes to this function will stop .leptos_routes() from generating a route for it, allowing a custom handler. These need to be in Actix path format
  • Generates a list of all routes defined in Leptos’s Router in your app. We can then use this to automatically create routes in Actix’s App without having to use wildcard matching or fallbacks. Takes in your root app Element as an argument so it can walk you app tree. This version is tailored to generated Actix compatible paths. Adding excluded_routes to this function will stop .leptos_routes() from generating a route for it, allowing a custom handler. These need to be in Actix path format
  • Generates a list of all routes defined in Leptos’s Router in your app. We can then use this to automatically create routes in Actix’s App without having to use wildcard matching or fallbacks. Takes in your root app Element as an argument so it can walk you app tree. This version is tailored to generated Actix compatible paths. Adding excluded_routes to this function will stop .leptos_routes() from generating a route for it, allowing a custom handler. These need to be in Actix path format. Additional context will be provided to the app Element.
  • Generates a list of all routes defined in Leptos’s Router in your app. We can then use this to automatically create routes in Actix’s App without having to use wildcard matching or fallbacks. Takes in your root app Element as an argument so it can walk you app tree. This version is tailored to generated Actix compatible paths.
  • An Actix struct@Route that listens for a POST request with Leptos server function arguments in the body, runs the server function if found, and returns the resulting HttpResponse.
  • An Actix struct@Route that listens for GET or POST requests with Leptos server function arguments in the URL (GET) or body (POST), runs the server function if found, and returns the resulting HttpResponse.
  • Provides an easy way to redirect the user from within a server function.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, asynchronously rendering an HTML page after all async Resources have loaded.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, asynchronously serving the page once all async Resources have loaded.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, serving an HTML stream of your application. The stream will include fallback content for any <Suspense/> nodes, and be immediately interactive, but requires some client-side JavaScript.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, serving an in-order HTML stream of your application. This stream will pause at each <Suspense/> node and wait for it to resolve before sending down its HTML. The app will become interactive once it has fully loaded.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, serving an in-order HTML stream of your application.
  • Returns an Actix Route that listens for a GET request and tries to route it using leptos_router, serving an HTML stream of your application.
  • Returns an Actix struct@Route that listens for a GET request and tries to route it using leptos_router, serving an HTML stream of your application.