DeriveInputExtension

Trait DeriveInputExtension 

Source
pub trait DeriveInputExtension {
    // Required method
    fn get_self(&self) -> &DeriveInput;

    // Provided methods
    fn as_struct(&self) -> CodamaResult<&DataStruct> { ... }
    fn as_enum(&self) -> CodamaResult<&DataEnum> { ... }
}

Required Methods§

Provided Methods§

Source

fn as_struct(&self) -> CodamaResult<&DataStruct>

Ensure the derive input is a struct and return the data.

Source

fn as_enum(&self) -> CodamaResult<&DataEnum>

Ensure the derive input is an enum and return the data.

Implementations on Foreign Types§

Source§

impl DeriveInputExtension for DeriveInput

Implementors§