pub trait SingleFromPath: Sized {
// Required method
fn from_path_at(ctx: &ParamContext, index: usize) -> Result<Self, PathError>;
}Available on crate feature
client-router only.Expand description
Trait for extracting a single value at a specific index from path parameters.
This is used internally to support the multi-argument Path<T> style:
|Path(user_id): Path<Uuid>, Path(post_id): Path<i64>|
Required Methods§
Sourcefn from_path_at(ctx: &ParamContext, index: usize) -> Result<Self, PathError>
fn from_path_at(ctx: &ParamContext, index: usize) -> Result<Self, PathError>
Extracts a single value at the given index.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".