Trait InertiaService

Source
pub trait InertiaService {
    // Required method
    fn inertia_route(self, path: &str, component: &'static str) -> Self;
}
Expand description

InertiaService trait define a method to be implemented to Inertia struct that allows to generate simple routes directly, without needing to create a handler function.

Required Methods§

Source

fn inertia_route(self, path: &str, component: &'static str) -> Self

Renders an Inertia component directly, without defining a specific handler function for it.

§Arguments
  • path - The router path.
  • component - The component to be rendered.
§Examples
use some_framework::App;

App::new().inertia_route("/", "Index");

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§