Laravel for Rust reference
The Rust crate, fusion-stack-laravel-rust (library fusion_stack), sends the same responses as the PHP package. These pages have the same sections as the PHP reference, for the Rust API. Headers, error codes and the error format are the same in both packages, so HTTP headers and Errors cover both.
Rust has no attributes or reflection, so what PHP reads from attributes and classes is declared in code: resources with Resource, endpoints with Config::endpoint, and route behaviour with middleware.
| Page | What it covers | PHP page |
|---|---|---|
| Resources | Resource: attributes, relationships and descriptions. | Requests and responses |
| Queries | ApiQuery: includes, sparse fieldsets, filters, sorts and pagination. | Queries |
| Middleware and endpoints | RequiresScope, CacheControl, CacheResponse and openapi::Endpoint. | Attributes |
| Version changes | The VersionChange trait and the document helpers. | Version changes |
| Errors | ApiError, ApiErrorCode and your own codes. | Errors |
| Configuration | Every Config method, with its config/api.php key. | Configuration |
| Console commands | Every api: command and its options. | Artisan commands |
| Testing helpers | ApiRequest, ApiResponse and version change tests. | Testing helpers |
Every page's examples come from the monorepo's Rust playground, workbench/rust, which passes the same HTTP conformance cases as the PHP playground.