Macro derive_deftly_adhoc

Source
derive_deftly_adhoc!() { /* proc-macro */ }
Expand description

Expand an ad-hoc template, on a data structure decorated #[derive_deftly_adhoc]

use derive_deftly::{Deftly, derive_deftly_adhoc};
#[derive(Deftly)]
#[derive_deftly_adhoc]
struct DdtaStructureType { }

derive_deftly_adhoc! {
    DdtaStructureType OPTIONS,..:
    TEMPLATE
}

Expands the template TEMPLATE for the type DdtaStructureType,

OPTIONS,.. is an optional comma-separated list of expansion options.

The definition of DdtaStructureType must have been decorated with #[derive(Deftly)], and #[derive_deftly_adhoc], and the resulting derive_deftly_driver_TYPE macro must be available in scope.

derive_deftly_adhoc! can be used in any context where the Rust language permits macro calls. For example, it can expand to expressions, statements, types, or patterns.