-
Error handling is unfortunately a little more idiomatic and less language-specified than it should be, but it's getting better. In a library, you should use thiserror to provide errors that wrap around existing errors / provide errors of your own. In an application, you should use anyhow which lets you use any error type implicitly, thus giving you the semantics you'd want. Yeah, this could be better, but it's getting there.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
There's Rustig which does it for panics, though it seems unmaintained and uses inspection of the final binary rather than source code/AST inspection.
-
Here's an example from some of my own (old) code of using a macro to generate a bunch of boilerplate methods. It's a very simple example, but it demonstrates how readable the macro language is.
-
Option and Result make a lot of sense if you come from a language or toolkit that already does this for you. Java's Optional, Scala's Option, C# LanguageExt, JS Monet, and others are good places to start. Searching Youtube or Google for "maybe monad" might also turn up something useful.
Related posts
-
Rust Needs an Official Specification
-
Improve an algorithm performance step by step
-
FreeBSD evaluating Rust's adoption into base system
-
Rust-GCC: GCC Front-End for Rust
-
rlci: Overly-documented Rust-powered Lambda Calculus Interpreter. A real programming language in just a bit of code and way too many comments.