Result & Pattern Matcher in Rust

Image for post
Image for post

It’s common in the software language community to worry about the “idiomatic” way of doing this. So what’s the idiomatic or rust way to do things. It’s easy to learn new languages and continue with old mindsets coming from C or Java for instance. IMHO Readability, High Cohesion, Loosely coupling, Debugability, Good Design are super important aspects in regards to you are idiomatic or not. But being idiomatic is like following a standard and makes things easier for all engineers. For this blog post, I want to share a video I recorded on using 2 resources in Rust called Pattern Matcher and Result. These mechanisms are not unique to Rust, actually, they are functional programming concepts. The result is also known as a Monad and you can find it in Haskel, Java, Scala, and several other languages, with different names like Either, Maybe, Option, Optional and so on and on. Pattern matcher is also found in lots of languages like Haskell and Scala.


Pattern Matcher & Result in Rust from Diego Pacheco on Vimeo.


Diego Pacheco

Originally published at on March 20, 2020.

Brazilian, Software Architect, SWE(Java, Scala, Rust, Go) SOA & DevOps expert, Author. Working with EKS/K8S. (Opinions on my own)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store