pub fn generate_application_full(
document: &DampenDocument,
model_name: &str,
message_name: &str,
handlers: &[HandlerSignature],
theme_document: Option<&ThemeDocument>,
persistence: Option<&PersistenceConfig>,
) -> Result<CodegenOutput, CodegenError>Expand description
Generate complete application code with theme, subscription, and persistence support
This is the most complete entry point for code generation that includes:
- Message enum with system theme variant (if follow_system is enabled)
- Subscription function for system theme detection
- Theme code generation
- View and update functions
- Window settings function for persistence (if persistence config is provided)
- Full window event handling for persistence (tracking size, position, save on close)
§Arguments
document- Parsed Dampen documentmodel_name- Name of the model struct (e.g., “Model”)message_name- Name of the message enum (e.g., “Message”)handlers- List of handler signaturestheme_document- Optional theme document for theme code generationpersistence- Optional persistence configuration for window state
§Returns
Ok(CodegenOutput) with generated code and warnings