Skip to main content

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl DeriveInputExtension for DeriveInput

Implementors§