Skip to content

Practical Patterns

Use &T/&mut T for APIs that borrow, and return plain values where possible.

Return E!T and handle with catch close to call sites.

Split runtime-facing code (IO/network/memory) from pure logic so testing stays simple.