Rust Patterns
Shared solutions for particular situations specific to programming in Rust.
Handle errors
[error_handling.incl: review further (P1)](https://github.com/john-cd/rust_howto/issues/464)
Customize errors
Recipe | Crates | Categories |
---|---|---|
anyhow | ||
thisError | ||
miette | ||
color-eyre |
[error_customization.incl: titles (P1)](https://github.com/john-cd/rust_howto/issues/462)
Rust design patterns
Recipe | Crates | Categories |
---|---|---|
Implement an abstract factory | {{#crate }} | |
Clone a struct storing a boxed trait object |
[design_patterns.incl: review (P1)](https://github.com/john-cd/rust_howto/issues/460)
| Implement the typestate pattern in Rust | {{#crate }} | |
Functional programming
Recipe | Crates | Categories |
---|---|---|
Compose iterators |
| [Use `lens`][ex-rust-patterns-lens] | [![lens_rs][c-lens_rs-badge]][c-lens_rs] | [![cat-rust-patterns][cat-rust-patterns-badge]][cat-rust-patterns] |
Rust idioms
Recipe | Crates | Categories |
---|---|---|
Rust idioms and patterns | {{#crate }} |
[P1 add](https://github.com/john-cd/rust_howto/issues/643)?
[index: organize / write (P1)](https://github.com/john-cd/rust_howto/issues/469)