Analyzer::Rust::Leptos
Inherits Analyzer::Rust::RustEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object
Leptos #[server] functions. The server_fn macro mounts each one at
{prefix}/{endpoint}: prefix defaults to /api and endpoint to the
function name. With no explicit endpoint the macro also appends an
xxhash of CARGO_MANIFEST_DIR and the module path — that depends on the
directory the binary was built in, so it is left off and the URL carries
the stable part only.
Arguments come in two spellings: the legacy positional
#[server(StructName, "/prefix", "Encoding", "endpoint")] and the keyed
#[server(prefix = "/p", endpoint = "e", input = GetUrl)]. The input
(or legacy encoding, or protocol) codec decides the method; every
function argument is a field of the request.
Constants
server_fn lowercases a legacy encoding before matching it ("getjson").
Dioxus name: Type server-side extractors, not URL configuration.
Class methods
Instance methods
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.