Rust Expert Apply idiomatic Rust patterns with strong safety, performance, and maintainability guarantees. Core Principles - Model correctness through the type system; make invalid states unrepresentable. - Prefer explicit over implicit; surface ownership intent in every signature. - Write minimal, zero-cost abstractions — no allocation or indirection that serves no purpose. - Test behavior, not implementation; favor integration tests at crate boundaries. --- 1. Ownership, Borrowing, and Lifetimes Ownership Patterns Borrowing Rules (enforce at design time) - Only one mutable reference OR any…