Skip to main content

Module canonical_prelude

Module canonical_prelude 

Source
Expand description

Parallel prelude for modules migrated to the canonical error catalog.

Mirrors prelude but re-exports Problem and ApiResult from modkit-canonical-errors so handlers can write the usual ApiResult<JsonBody<T>> signature without name clashes against the legacy types. Each per-module migration PR swaps use modkit::api::prelude::*; for use modkit::api::canonical_prelude::*; — no per-signature edits.

This module is collapsed into prelude and the legacy entries above are deleted.

Re-exports§

pub use super::response::JsonBody;
pub use super::response::JsonPage;
pub use super::response::created_json;
pub use super::response::no_content;
pub use super::response::ok_json;
pub use super::select::apply_select;

Structs§

Json
JSON Extractor / Response.
Problem
StatusCode
An HTTP status code (status-code in RFC 9110 et al.).

Enums§

CanonicalError

Traits§

IntoResponse
Trait for generating responses.

Type Aliases§

ApiResult
Result type alias matching prelude::ApiResult but parameterised on canonical Problem.

Attribute Macros§

resource_error
Attribute macro that generates a resource error type with builder-returning constructors for the 13 canonical error categories that carry a resource_type.