1:07:08
Rustacean Station
rustacean-station.org
Episode: What's New in Rust 1.52 and 1.53
...So this is when you write a match, then it used to be that you could only really match one pattern or another pattern. So you could say Let's say you're matching on an error type, like an IO error, and you want it to match on one...
Podcast
2021-07-12
1:07:08
francismurillo.github.io
...fn next(&mut self) -> Option<Self::Item> {
loop {
match *self.current_tree {
None => match self.prev_nodes.pop() {
None => {
return None;
}
Some(ref prev_node) => {
self.current_tree = &prev_node.right;
return Some(&prev_node.value);
}
},
Some(ref current_node) => {
if current_node.left.is_some() {
self.prev_nodes.push...
News & Blog Posts
2019-08-06
~46 min read
contextgeneric.dev
...MatchWithValueHandlers – matches and dispatches on an owned input Value.
MatchWithValueHandlersRef – matches and dispatches on a borrowed input &Value.
MatchWithValueHandlersMut – matches and dispatches on a mutably borrowed input &mut Value.
These dispatchers are compatible with both the owned and borrowed variants of the handler traits, such as Computer and ComputerRef. Within...
Project/Tooling Updates
2025-10-15
~23 min read
bytecodealliance.org
...Many of the projects that we set in motion in 2021 and planned to finish in 2022 – most significantly, a new register allocator, and ISLE, a pattern-matching DSL that has come to serve as the core of our backends – have come to fruition, entering production and improving compiler output...
Project/Tooling Updates
2022-12-21
~17 min read
github.com
...use ratelimit::Ratelimiter; // 10,000 requests/s let ratelimiter = Ratelimiter::new(10_000); loop { match ratelimiter.try_wait() { Ok(()) => { // token acquired -- perform rate-limited action break; } Err(wait) => { // rate limited -- sleep and retry std::thread::sleep(wait); } } } For more control over burst capacity and initial tokens: use ratelimit::Ratelimiter; let...
Crate
v2.0.0
2026-04-21
blog.knoldus.com
...nix = "0.18.0"
Now add the below code in main.rs
use nix::sys::wait::wait;
use nix::unistd::ForkResult::{Child, Parent};
use nix::unistd::{fork, getpid, getppid};
fn main() {
let pid = fork();
match pid.expect("Fork Failed: Unable to create child process!") {
Child => println!(
"Hello from child process...
Learn More Rust
2020-09-09
~1 min read
crates.io
...We want to perform one operation on all the leading contiguous // elements that match some predicate, and a different thing with the rest of // the elements. With the `xs`, we will use the normal `take_while`. With the // `ys`, we will use `peeking_take_while`. let xs: Vec<u8> = (0...
Crate
v1.0.0
2021-09-03
tutorialedge.net
...JSJITorExpr) -> JSJITorExpr
{
match e
{
JSJITorExpr::Jit { label: label } => jump(label),
JSJITorExpr::Expr { expr: expr } => {
let rawexpr = *expr;
match rawexpr
{
JSExpr::Integer {..} => JSJITorExpr::Expr { expr: Box::new(rawexpr) },
JSExpr::String {..} => JSJITorExpr::Expr { expr: Box::new(rawexpr) },
JSExpr::OperatorAdd { lexpr: l, rexpr: r } => {
let l = eval(*l);
let r = eval(*r);
//call...
News & Blog Posts
2018-09-04
~8 min read
micheletti.io
...Filters now support boolean operators, parentheses, negation, and body/header matching:
method:POST & status:500
host:api.example.test & !path:/health
(status:401 | status:403) & header:authorization
type:json & response_body:error
proto:wss | proto:https
Adjacent terms are an implicit AND, so this works too:
method:POST host:api...
Project/Tooling Updates
2026-08-05
~10 min read
blog.servo.org
...mathieuh updated the Request constructor to match more recent specification changes.
impowski added Graphviz output of rust-bindgen’s IR
New Contributors
Dawing Cho
Eddie Quan
Gregory Katz
Huxley
Ian
Sam Liu
Jefry Lagrange
Neck Varentsov
vwvww
Ethan Glasser-Camp
Interested in helping build a web browser? Take a look...
Other Weeklies from Rust Community
2017-02-28
~1 min read
barretts.club
...With these ideas in mind, let's take a brief look at Rust's error handling!
let mut file_result = File::open("hello.txt");
match file_result {
Ok(mut file) => {
let mut data = String::new();
let _ = file.read_to_string(&mut data);
}
Err(e) => {
println!("error when reading file: {e...
Observations/Thoughts
2024-03-20
~4 min read
arxiv.org
...For other topics (e.g., related topics with language features such as structs, patterns and matchings, and foreign function interface), information is only available on Q&A websites while lacking in the official documentation. Finally, we discuss implications for programming language documenters, particularly how to leverage our approach to prioritize...
Research
2022-03-02
~1 min read
blog.guillaume-gomez.fr
...Request) -> Self::Future {
let path = req.path().to_owned();
::futures::finished(match *req.method() {
Get => {
let values = splitter(&path);
if values.len() != 1 || !self.rw.exists(&values[0]) {
Response::new().with_status(StatusCode::NotFound)
} else if let Some(mut file) = self.rw.get_file(&values[0], false) {
let mut out...
News & Blog Posts
2017-02-28
~10 min read
docs.rs
...a=e op='*' b=e # mult | left=e '+' b=e # add For such rule ANTLR will generate enum EContextAll with a MultContext and an AddContext variant (plus an Error variant), so you will be able to match on them in your code. Also corresponding struct for each alternative will contain...
Crate
v0.6.0
2026-09-27
crates.io
...Features Selector matching support. The rules are sorted by specificity. !important parsing support. Has a high-level parsers and low-level, zero-allocation tokenizers. No unsafe. Minimum supported Rust Version (MSRV) This version of SimpleCSS has been verified to compile with Rust 1.65 and later. Future versions of SimpleCSS...
Crate
v0.2.2
2025-01-06
rust-lang.github.io
...An enum may be #[repr(transparent)] if it has exactly one variant, and that variant matches the same conditions which struct requires for transparency. Some concrete illustrations follow.
A union may be #[repr(transparent)] if it has exactly one non-zero-sized field:
// This union has the same representation as...
RFC 2645
RFC
2019-02-13
~8 min read
lpc.events
...It also provides other important benefits, such as improved error handling, stricter typing, sum types, pattern matching, privacy, closures, generics, etc.
Possible Rust for Linux topics:
Rust in the kernel (e.g. status update, next steps...).
Use cases for Rust around the kernel (e.g. subsystems, drivers, other modules...).
Discussions...
Virtual
2023-10-18
~1 min read
www.lpalmieri.com
...we can use a match statement for control flow - we behave differently depending on the failure scenario we are dealing with.
//! src/routes/subscriptions.rs
use actix_web::http::StatusCode;
// [...]
impl ResponseError for SubscribeError {
fn status_code(&self) -> StatusCode {
match self {
SubscribeError::ValidationError(_) => StatusCode::BAD_REQUEST,
SubscribeError::DatabaseError(_)
| SubscribeError::StoreTokenError...
Rust Walkthroughs
2021-05-19
~43 min read
blog.veeso.dev
...S) -> RemoteResult<String> { trace!("Running command: {}", cmd.as_ref()); let mut channel = match session.channel_session() { Ok(ch) => ch, Err(err) => { return Err(RemoteError::new_ex( RemoteErrorType::ProtocolError, format!("Could not open channel: {err}"), )) } }; if let Err(err) = channel.exec(cmd.as_ref()) { return Err(RemoteError::new_ex( RemoteErrorType::ProtocolError...
Observations/Thoughts
2025-01-08
~17 min read
docs.rs
...use lebe::Endian; fn main(){ let mut numbers: &[i32] = &[ 32, 102, 420, 594 ]; numbers.convert_current_to_little_endian(); } Why not use byteorder ? This crate supports batch-writing slices with native speed where the os has the matching endianness. Writing slices in byteorder must be done manually, and may be...
Crate
v0.5.3
2025-09-06