pub trait DocPathParams {
// Required method
fn describe(op: &mut Operation, path_param_names: &[&'static str]);
}Expand description
Contributes path parameters to an operation.
Handles three shapes via separate impls:
- struct form —
Path<T: IntoParams>with#[into_params(parameter_in = Path)]onT; names come from the struct’s field identifiers. - scalar form —
Path<T: PathScalar>for primitives;names[0]provides the parameter name from the route template. - tuple form —
Path<(T1, …, Tn)>where every element isPathScalar;names[i]provides the i-th parameter name.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T: IntoParams> DocPathParams for Path<T>
Struct-form path impl — names come from T::into_params.
impl<T: IntoParams> DocPathParams for Path<T>
Struct-form path impl — names come from T::into_params.