Similar to a 'switch statement' you might see in other languages, the Match Operator in Rust allows you to do different things based on the value of something else. You can use it to compare numbers, strings etc.
In this example we look at numbers and strings, as well as ranges and or's - it is very powerful.
It is based on 'patterns' in Rust, for more info:
https://doc.rust-lang.org/1.6.0/book/...
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
На этой странице сайта вы можете посмотреть видео онлайн Rust Programming Tutorial #29 - Pattern Matching (Switch Statement) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь dcode 18 Декабрь 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 18,375 раз и оно понравилось 350 зрителям. Приятного просмотра!