Skip to main content

register_server_fn_export_data

Function register_server_fn_export_data 

Source
pub fn register_server_fn_export_data() -> &'static str
Available on not (target_family=wasm and target_os=unknown).
Expand description

Register this server function with a router

This function should be called during application startup to register the server function handler with the HTTP router.

ยงExample

use reinhardt_pages::server_fn::ServerFnRouterExt;
use reinhardt_urls::routers::ServerRouter;

let router = ServerRouter::new()
    .server_fn(get_user);