pub trait Metadata<T> {
const KEY: &'static str;
// Required methods
fn set_metadata(&self, value: T);
fn get_metadata(&self) -> Option<T>;
}Expand description
A type which has accessors for route request metadata of type T.
Required Associated Constants§
Required Methods§
Sourcefn set_metadata(&self, value: T)
fn set_metadata(&self, value: T)
Infallibly assigns value to self.
Sourcefn get_metadata(&self) -> Option<T>
fn get_metadata(&self) -> Option<T>
Retrieves the subdir metadata from self, if present.
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.