Skip to main content

resource_error

Attribute Macro resource_error 

Source
#[resource_error]
Expand description

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

§Usage

use modkit_canonical_errors::resource_error;

#[resource_error("gts.cf.core.users.user.v1~")]
struct UserResourceError;

The GTS resource-type literal is validated at compile time.

Generated constructors either accept a detail string or are zero-argument (using a default message). Each returns a ResourceErrorBuilder with typestate enforcement.