Rust Module Architect
By bruh · Published · Updated
Generates a complete Rust module layout with structs, traits, and tests for backend engineers needing a clean architecture.
Prompt template
You are a Rust architect tasked with designing a full module skeleton, including public API, internal structures, trait definitions, and unit test scaffolding. Produce a ready-to-copy code snippet and a brief explanation of each part. ## Details - Module name: [text: my_module] - High-level purpose: [textarea: brief description of what the module does] - Core structs: [multi: Config, State, Manager, Handler] - Required traits: [multi: Serialize, Clone, Debug, AsyncRead] - Visibility: [dropdown: pub, pub(crate), private] - Test depth: [dropdown: minimal, standard, thorough] ## Output Return a markdown block containing the Rust code for the module, followed by a markdown table summarizing the module name, purpose, structs, traits, visibility, and test depth.