mergegate/.claude/templates/rust-module.md
Shunsuke Hayashi 00d5d4d4e9 chore: Initialize Miyabi project with full planning
- Add .claude/ configuration (agents, commands, prompts, templates)
- Add comprehensive documentation:
  - WBS.md - Work Breakdown Structure
  - SPRINT_PLANNING.md - 4-sprint detailed plan
  - OPERATION_PLAN.md - Execution procedures
  - PRODUCT_SPEC.md - Product requirements
  - PREPARATION_OPS.md - Pre-sprint checklist
- Add PlantUML diagrams (wbs-diagram, gantt-chart)
- Configure Miyabi (.miyabi.yml)
- Set up Rust workspace structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 17:45:08 +09:00

759 B

Rust Module Template

//! Module description
//!
//! # Examples
//!
//! ```rust
//! use crate::module_name;
//!
//! // Example usage
//! ```

use anyhow::Result;

/// Description
pub struct StructName {
    /// Field description
    field: Type,
}

impl StructName {
    /// Creates a new instance
    pub fn new() -> Self {
        Self {
            field: Default::default(),
        }
    }

    /// Method description
    pub fn method(&self) -> Result<()> {
        Ok(())
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_example() {
        // Arrange
        let instance = StructName::new();

        // Act
        let result = instance.method();

        // Assert
        assert!(result.is_ok());
    }
}