Rust
Use ownership and borrowing to keep domain logic pure. Covers native Result and Option, exhaustive enums, iterator composition, crate layout, API contracts, and behavioral tests.
Comments
Document Rust public contracts, failure cases, and borrow requirements with verifiable examples.Conditionals
Use early guards for rejection and exhaustive matches for Rust domain variants.Errors
Return typed Rust Results and propagate expected failures without panics or unchecked extraction.File structure
Organize Rust modules by owning capability and keep public crate exports deliberate.Functional Rust
Use pure functions, native Results, exhaustive enums, borrowed inputs, and iterator transformations. Apply this pack to Rust source and examples.Functions
Declare focused Rust operations with explicit input ownership and return contracts.Naming
Use Rust casing conventions and name concrete operations and domain values.Ownership
Borrow inputs, produce new domain values, and avoid clones or interior mutation that hide ownership.Paradigm
Compose native Rust functions and immutable values while isolating resource effects.Testing
Verify Rust value contracts, resource adapters, and public examples with real observable outcomes.Types
Use enums, newtypes, and validated boundaries to represent valid Rust domain states.Utilities
Use native Rust iterator and Result combinators before adding an extension crate.