mockiato-codegen 0.9.6

Internally used by mockiato for code generation. This crate should never be used directly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::parse::trait_decl::TraitDecl;
use proc_macro2::TokenStream;
use std::fmt::Debug;
use syn::{Ident, Path};

#[cfg_attr(feature = "debug-impls", derive(Debug))]
pub(crate) struct GenerateOptions {
    pub(crate) custom_struct_ident: Option<Ident>,
    pub(crate) force_static_lifetimes: bool,
    pub(crate) custom_trait_path: Option<Path>,
}

#[cfg_attr(test, mockiato::mockable)]
pub(crate) trait CodeGenerator: Debug {
    fn generate(&self, trait_decl: &TraitDecl, options: GenerateOptions) -> TokenStream;
}