filmov
tv
Rust Error Handling: When to Use panic! vs Result Explained - Full Crash Rust Tutorial for Beginners

Показать описание
By the end of this video, you will clearly understand when to use panic! and when to use Result in Rust. We start with a quick recap of the panic! macro and discuss scenarios where it is appropriate to use panic, such as in examples, prototypes, tests, edge cases, and situations where we know more than the Rust compiler.
Then, we explore when to use the Result type, focusing on parsing inputs, handling rate-limiting HTTP requests, and creating custom error types. Finally, we summarize the key points.
Related videos:
0:00 To panic or not to panic - a quick recap
00:48 When to Use Panic
1:23 Panic for Examples
2:00 panic! for Prototypes
2:56 Panic in Tests
3:24 Panic for Edge Cases
4:00 Panic when we know more than the Rust compiler
5:16 When to use Result in Rust
6:13 Using Result when Parsing Inputs - Handling Parsing Errors
7:10 Use Result to handle rate-limiting HTTP
8:01 Custom Error Types
9:17 Summary - key points
Then, we explore when to use the Result type, focusing on parsing inputs, handling rate-limiting HTTP requests, and creating custom error types. Finally, we summarize the key points.
Related videos:
0:00 To panic or not to panic - a quick recap
00:48 When to Use Panic
1:23 Panic for Examples
2:00 panic! for Prototypes
2:56 Panic in Tests
3:24 Panic for Edge Cases
4:00 Panic when we know more than the Rust compiler
5:16 When to use Result in Rust
6:13 Using Result when Parsing Inputs - Handling Parsing Errors
7:10 Use Result to handle rate-limiting HTTP
8:01 Custom Error Types
9:17 Summary - key points
Rust Error Handling - Best Practices
Error Handling in Rust
A new way of error handling in Rust
Simple error handling in Rust
A Simpler Way to See Results
Error Handling in Rust
4 levels of Rust error handling
Rust: Error Handling
GitLab Duo Coffee Chat: Challenge - Refactor Perl to Python (and more languages)
Rust Error Handling: When to Use panic! vs Result Explained - Full Crash Rust Tutorial for Beginners
Tim McNamara - 4 levels of error handling
Rust Handles Errors Way Better Than Python
Rust Linz, January '22 - Error Handling in Rust - A Pragmatic Approach by Luca Palmieri
Error handling [23 of 35] | Rust for Beginners
RustConf 2020 - Error handling Isn't All About Errors by Jane Lusby
creating your own errors in rust may be easier than you think
Rust's Most Important Containers 📦 10 Useful Patterns
Rust: Error Handling (When to panic!)
Rust - Which error-handling crate to use? ErrorTypes, thiserror & anyhow
All about error handling in the Rust programming language
What Makes Rust Unique Error handling
🤯 try / catch is the devil. Rust solves it!
Introduction to Rust - Part 11: Real-World Interfaces and Error-Handling
5 Better ways to code in Rust
Комментарии