Expand description
§use-api-param
API parameter primitives for RustUse.
Models path, query, header, and body parameter names plus location, requirement, and style labels.
§Example
use use_api_param::{ParamLocation, PathParamName};
let value = PathParamName::new("user_id").expect("valid API primitive");
assert_eq!(value.as_str(), "user_id");
assert_eq!(ParamLocation::Path.to_string(), "path");§Scope
- Small validated types for API metadata.
- Stable display labels and conservative parsing helpers.
- Dependency-light primitives that can be reused by other RustUse crates.
§Non-goals
- No request parser.
- No framework binding.
- No schema validation.
§License
Licensed under either of the following, at your option:
- Apache License, Version 2.0
- MIT license
Structs§
- Body
Param Name - Header
Param Name - Path
Param Name - Primitive
Metadata - Lightweight metadata tying this crate’s primary text and label together.
- Query
Param Name
Enums§
- ApiPrimitive
Error - Error returned when API primitive text or labels are invalid.
- Param
Location - API parameter location labels.
- Param
Requirement - API parameter requirement labels.
- Param
Style - API parameter style labels.