Searching with Iterators using Structs

Learn about Rust's core concepts such as iterators and pattern matching in a struct.

Though visitors are now represented as structures, we still need to be able to search them. We could use the same search code as before, comparing your_name with to call the greeting method directly, but this method isn’t ideal. This gets unwieldy as our visitors become more complicated and we add more visitors to the list.

Get hands-on with 1200+ tech skills courses.