Struct devise::DeriveGenerator [−][src]
pub struct DeriveGenerator { pub input: ItemInput, pub item: TraitItem, pub support: Support, pub validator: Option<Box<dyn Validator + 'static, Global>>, pub inner_mappers: Vec<Box<dyn Mapper + 'static, Global>, Global>, pub outer_mappers: Vec<Box<dyn Mapper + 'static, Global>, Global>, pub type_bound_mapper: Option<Box<dyn Mapper + 'static, Global>>, // some fields omitted }
Fields
input: ItemInput
item: TraitItem
support: Support
validator: Option<Box<dyn Validator + 'static, Global>>
inner_mappers: Vec<Box<dyn Mapper + 'static, Global>, Global>
outer_mappers: Vec<Box<dyn Mapper + 'static, Global>, Global>
type_bound_mapper: Option<Box<dyn Mapper + 'static, Global>>
Implementations
pub fn build_for<I, T>(input: I, trait_impl: T) -> DeriveGenerator where
T: ToTokens,
I: Into<TokenStream>,
Take the 0-indexed trait_gen
th generic in the generics in impl<..>
being built and substitute those tokens in place of the 0-indexed
impl_gen
th generic of the same kind in the input type.