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§
fn get_self(&self) -> &DeriveInput
Provided Methods§
Sourcefn as_struct(&self) -> CodamaResult<&DataStruct>
fn as_struct(&self) -> CodamaResult<&DataStruct>
Ensure the derive input is a struct and return the data.
Sourcefn as_enum(&self) -> CodamaResult<&DataEnum>
fn as_enum(&self) -> CodamaResult<&DataEnum>
Ensure the derive input is an enum and return the data.