| 6 | use proc_macro2::TokenStream; |
| 7 | |
| 8 | pub trait Framework { |
| 9 | fn name(&self) -> &'static str; |
| 10 | |
| 11 | fn lib_header(&self) -> Option<String>; |
| 12 | |
| 13 | fn generate(&self, component_name: String, svg: String) -> Result<TokenStream, Box<dyn Error>>; |
| 14 | |
| 15 | fn generate_example(&self, component_names: &[String]) -> Result<TokenStream, Box<dyn Error>>; |
| 16 | |
| 17 | fn format( |
| 18 | &self, |
| 19 | package: String, |
| 20 | repository_path: &Path, |
| 21 | path: PathBuf, |
| 22 | ) -> Result<(), Box<dyn Error>>; |
| 23 | } |