Spikard.App (spikard v0.15.6-rc.14)

Copy Markdown

Spikard application builder.

Summary

Functions

Set the server configuration.

Register a CONNECT route at the given path.

Register a CONNECT route at the given path.

Register a DELETE route at the given path.

Register a DELETE route at the given path.

Register a GET route at the given path.

Register a GET route at the given path.

Register a HEAD route at the given path.

Register a HEAD route at the given path.

Build the underlying Axum router.

Create a new application with the default server configuration.

Register an OPTIONS route at the given path.

Register an OPTIONS route at the given path.

Register a PATCH route at the given path.

Register a PATCH route at the given path.

Register a POST route at the given path.

Register a POST route at the given path.

Register a PUT route at the given path.

Register a PUT route at the given path.

Register a route using the provided builder and handler function.

Run the HTTP server using the configured routes.

Register a TRACE route at the given path.

Register a TRACE route at the given path.

Functions

config(self, config)

Set the server configuration.

connect(app, path, handler)

Register a CONNECT route at the given path.

connect_decorator(app, path)

Register a CONNECT route at the given path.

delete(app, path, handler)

Register a DELETE route at the given path.

delete_decorator(app, path)

Register a DELETE route at the given path.

get(app, path, handler)

Register a GET route at the given path.

get_decorator(app, path)

Register a GET route at the given path.

head(app, path, handler)

Register a HEAD route at the given path.

head_decorator(app, path)

Register a HEAD route at the given path.

into_router(self)

Build the underlying Axum router.

Errors

Returns an error if server or router construction fails.

new(options \\ [])

Create a new application with the default server configuration.

options(app, path, handler)

Register an OPTIONS route at the given path.

options_decorator(app, path)

Register an OPTIONS route at the given path.

patch(app, path, handler)

Register a PATCH route at the given path.

patch_decorator(app, path)

Register a PATCH route at the given path.

post(app, path, handler)

Register a POST route at the given path.

post_decorator(app, path)

Register a POST route at the given path.

put(app, path, handler)

Register a PUT route at the given path.

put_decorator(app, path)

Register a PUT route at the given path.

route(self, builder, handler)

Register a route using the provided builder and handler function.

Errors

Returns an error if route construction fails or if the handler registration fails.

run(self)

Run the HTTP server using the configured routes.

Errors

Returns an error if server construction or execution fails.

trace(app, path, handler)

Register a TRACE route at the given path.

trace_decorator(app, path)

Register a TRACE route at the given path.