Skip to content

Structs practice problems in Rust

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 12 of 12

Title Difficulty
Accessing an owned value while it is borrowed Medium
Build a configuration from defaults and overrides Easy
Build a generic stack with conditional methods Medium
Convert distances with tuple and unit structs 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
Three namespaces: types, values, and macros Medium
Zero-copy tokenizer: Parser<'a> Hard