Login
From:
Kobzol’s blog
(Uncensored)
subscribe
Combining struct literal syntax with read-only field access | Kobzol’s blog
https://kobzol.github.io/rust/2025/09/01/combining-struct-literal-syntax-with-read-only-field-access.html
links
backlinks
Tagged with:
rust
Recently, I found myself struggling with a small annoyance related to struct field visibility and struct initialization in Rust. It’s no rocket science, but I thought about it long enough that I might as well turn it into a blog post.
Roast topics
Find topics
Find it!