> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 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.


[CommentsDocument Rust public contracts, failure cases, and borrow requirements with verifiable examples.](/packs/languages/rust/comments)[ConditionalsUse early guards for rejection and exhaustive matches for Rust domain variants.](/packs/languages/rust/conditionals)[ErrorsReturn typed Rust Results and propagate expected failures without panics or unchecked extraction.](/packs/languages/rust/errors)[File structureOrganize Rust modules by owning capability and keep public crate exports deliberate.](/packs/languages/rust/file-structure)[Functional RustUse pure functions, native Results, exhaustive enums, borrowed inputs, and iterator transformations. Apply this pack to Rust source and examples.](/packs/languages/rust/README)[FunctionsDeclare focused Rust operations with explicit input ownership and return contracts.](/packs/languages/rust/functions)[NamingUse Rust casing conventions and name concrete operations and domain values.](/packs/languages/rust/naming)[OwnershipBorrow inputs, produce new domain values, and avoid clones or interior mutation that hide ownership.](/packs/languages/rust/ownership)[ParadigmCompose native Rust functions and immutable values while isolating resource effects.](/packs/languages/rust/paradigm)[TestingVerify Rust value contracts, resource adapters, and public examples with real observable outcomes.](/packs/languages/rust/testing)[TypesUse enums, newtypes, and validated boundaries to represent valid Rust domain states.](/packs/languages/rust/types)[UtilitiesUse native Rust iterator and Result combinators before adding an extension crate.](/packs/languages/rust/utilities)