pub struct ParameterMetadata {
pub method_name: &'static str,
pub parameters: &'static [ParamMeta],
}Expand description
All parameter metadata for a method call.
This is stored in request extensions to allow middleware to access parameter information at runtime.
§Example
ⓘ
// In middleware
if let Some(meta) = request.extensions().get::<ParameterMetadata>() {
println!("Method: {}", meta.method_name);
for param in meta.parameters {
println!(" {}: {} ({:?})", param.name, param.type_name, param.location);
}
}Fields§
§method_name: &'static strThe method name that was called.
parameters: &'static [ParamMeta]Metadata for each parameter.
Trait Implementations§
Source§impl Clone for ParameterMetadata
impl Clone for ParameterMetadata
Source§fn clone(&self) -> ParameterMetadata
fn clone(&self) -> ParameterMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParameterMetadata
impl Debug for ParameterMetadata
Source§impl Default for ParameterMetadata
impl Default for ParameterMetadata
Source§fn default() -> ParameterMetadata
fn default() -> ParameterMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParameterMetadata
impl PartialEq for ParameterMetadata
impl Copy for ParameterMetadata
impl Eq for ParameterMetadata
impl StructuralPartialEq for ParameterMetadata
Auto Trait Implementations§
impl Freeze for ParameterMetadata
impl RefUnwindSafe for ParameterMetadata
impl Send for ParameterMetadata
impl Sync for ParameterMetadata
impl Unpin for ParameterMetadata
impl UnwindSafe for ParameterMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.