Hi Guys,<p>This is the fifth post I wrote about Learning Rust on Medium, <a href="https://medium.com/learning-rust" rel="nofollow">https://medium.com/learning-rust</a>. Now you can read the same content via <a href="https://learning-rust.github.io" rel="nofollow">https://learning-rust.github.io</a> as well. In this post, I tried to summarize about,<p><pre><code> - Smart Compiler
- Why Compiler?
- Explain Error Codes
- Panicking
- panic!()
- unimplemented!()
- unreachable!()
- assert!(), assert_eq!(), assert_ne!()
- debug_assert!(), debug_assert_eq!(), debug_assert_ne!()
- Option and Result
- Why Option and Result?
- Basic usages of Option
- Basic usages of Result
- is_some(), is_none(), is_ok(), is_err()
- ok(), err() for Result types
- Unwrap and Expect
- unwrap()
- expect()
- unwrap_err() and expect_err() for Result types
- unwrap_or(), unwrap_or_default() and unwrap_or_else()
- Error and None Propagation
- ? Operator
- try!()
- Error propagation from main()
- Combinators
- What is a combinator?
- or() and and()
- or_else()
- and_then()
- filter()
- map() and map_err()
- map_or() and map_or_else()
- ok_or() and ok_or_else()
- as_ref() and as_mut()
- Custom Error Types
- Error trait
- From trait
</code></pre>
> I am a Sri Lankan🇱🇰 Web Developer who works in Vietnam🇻🇳. I am not a native English speaker and I am just practicing Rust in my very little leisure time, while learning more about Golang, Devops and so much in the workplace.
So, if you found any mistake or something I need to be changed, even a spelling or a grammar mistake, please let me know.<p>⭐ Hire me! - <a href="https://github.com/dumindu/hire-me/blob/master/resume_dumindu_madunuwan.pdf" rel="nofollow">https://github.com/dumindu/hire-me/blob/master/resume_dumind...</a><p>⭐ Buy me a coffee! - <a href="https://www.buymeacoffee.com/dumindu" rel="nofollow">https://www.buymeacoffee.com/dumindu</a><p>⭐ Contribute! - <a href="http://learning-rust.github.io" rel="nofollow">http://learning-rust.github.io</a><p>Thanks