camel-endpoint-macros
Proc-macros for the camel-endpoint crate.
UriConfig Derive Macro
Generates from_uri() implementation for configuration structs based on field attributes.
Struct Attributes
#[uri_scheme = "xxx"]- Required. Defines the URI scheme.#[uri_config(skip_impl)]- Skip automaticfrom_uri()implementation.#[uri_config(crate = "path")]- Custom crate path for generated code (default:camel_endpoint). Usecamel_component_apiwhen the derive is used inside component crates.
Field Attributes
#[uri_param]- Marks field as query parameter.#[uri_param(default = "value")]- Default value if not specified.#[uri_param(name = "paramName")]- Map to different query param name.
Example
use UriConfig;
use UriConfig;
License
Apache-2.0