Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Rust
/
Pattern matching
In match &job { Job { owner, .. } => ... }, where owner is a String field, what is the us…
from Pattern matching
Rust 1.98
intermediate
1 min
In match &job { Job { owner, .. } => ... }, where owner is a String field, what is the usual binding type?
&String, because the subject is shared-borrowed
String, moved out of job
&mut String, because patterns are mutable
str, copied out of the allocation
Check
Ask AI about this kata
Report an error
next kata
Which slice pattern accepts exactly a command name followed by one argument?
Quiz
A new version is available
Reload