Skip to content

Conversation

@duyet
Copy link
Member

@duyet duyet commented Oct 26, 2025

No description provided.

duyetbot and others added 2 commits October 26, 2025 06:51
Add 5 new comprehensive idioms to the Rust Idioms section, with focus on data engineering patterns:

- Newtype Pattern: Type-safe wrappers for domain concepts, IDs, units, and validated data
- RAII Guards: Resource management patterns for connections, files, transactions, and cleanup
- Zero-Cost Abstractions: Iterator patterns, generics, and compiler optimizations for performance
- Typestate Pattern: Compile-time state machine validation for pipelines and protocols
- Error Handling Patterns: Idiomatic error handling with thiserror and anyhow

Each idiom includes:
- Comprehensive Vietnamese explanations
- Real-world code examples relevant to data engineering
- Best practices and anti-patterns
- Performance considerations
- When to use and when not to use

These additions significantly expand the idioms section with patterns essential for building robust, performant data pipelines in Rust.

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

Co-Authored-By: Claude <[email protected]>
…neous data

Add detailed guide on "Sử dụng Enum để chứa nhiều loại dữ liệu" (Using Enums to contain multiple data types in Vec).

Content includes:
- Problem: Vec can only contain one type
- Solution: Using Enums to wrap different types
- Real-world examples for data engineering:
  - Spreadsheet cells with mixed types
  - Database rows with SqlValue enum
  - JSON-like data structures
  - Log events and metrics
  - Configuration values
  - Message queue events
- Pattern matching and type-safe operations
- Helper methods (as_*, to_*, is_*)
- Best practices and when to use
- Comparison with trait objects
- Memory layout considerations

The guide provides 10+ complete working examples showing how to handle heterogeneous data in a type-safe way, which is essential for data engineering tasks like:
- Processing CSV/database rows with mixed column types
- Handling JSON/configuration data
- Building data pipelines with various data types
- Logging and event systems

All examples are practical, runnable, and focused on common data engineering scenarios.

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

Co-Authored-By: Claude <[email protected]>
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Oct 26, 2025
@github-actions
Copy link

Build book successfully!

@dosubot dosubot bot added the enhancement New feature or request label Oct 26, 2025
@duyet duyet merged commit c1d061c into main Oct 26, 2025
1 check passed
@duyet duyet deleted the claude/expand-rust-idioms-011CUVMZiQug2qgpxDV3CK5k branch October 26, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants