Trait darling::FromDeriveInput

source ·
pub trait FromDeriveInput: Sized {
    // Required method
    fn from_derive_input(input: &DeriveInput) -> Result<Self, Error>;
}
Expand description

Creates an instance by parsing an entire proc-macro derive input, including the, identity, generics, and visibility of the type.

This trait should either be derived or manually implemented by a type in the proc macro crate which is directly using darling. It is unlikely that these implementations will be reusable across crates.

Required Methods§

source

fn from_derive_input(input: &DeriveInput) -> Result<Self, Error>

Create an instance from syn::DeriveInput, or return an error.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromDeriveInput for ()

source§

impl FromDeriveInput for DeriveInput

Implementors§