Skip to content

Structs practice problems in Rust

Difficulty:
Category:
Tag:

Showing 12 of 12

Status Title Difficulty
A generic Stack, and conditional impl blocks Medium
Default, #[default] on an enum variant, and ..Default::default() Easy
Destructuring structs and nested patterns Medium
Field init shorthand and struct update syntax Easy
impl blocks: associated functions, methods, Self and associated constants Easy
Partial moves: taking one field and leaving the rest Medium
Split borrows: the checker reasons about places, not variables Medium
Structs: naming your data Easy
The owner is frozen too: E0503, E0505, E0506 Medium
Three namespaces: types, values, and macros Medium
Tuple structs and unit structs: the other two shapes Easy
Zero-copy tokenizer: `Parser<'a>` Hard