pub trait FromInput: Sized {
// Required method
fn from_input(input: &Input) -> Result<Self>;
}Expand description
Extracts a value from the macro input context.
Implement this trait to define how a type is resolved from an Input
(derive or item). Built-in impls exist for Ident, Generics, and
Visibility. The #[element] macro uses this trait to auto-resolve
extractor parameters.
Required Methods§
fn from_input(input: &Input) -> Result<Self>
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.