Skip to content
TILens What matters today in tech v0.4.0
Theme
Topics - Rust
Calendar · NOV 2026
‹ Nov 2026 ›
  1. JAN
  2. FEB
  3. MAR
  1. APR
  2. MAY
  3. JUN
  1. JUL
  2. AUG
  3. SEP
  1. OCT
  2. NOV
  3. DEC
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Favorites (0)

Community stream

Community

Rookie Question: &T vs Box<T>

As someone who is not professionally a programmer or officially educated as such, I am about two to three months into learning Rust, and most concepts I have been able to slowly reason my way through. Something I have been stuck on for a while now,…

rust-users-forum

Inline specialization

Warning: This is a half-baked idea. There are many soundness issues with specialization in its current form. I would like to propose an alternative. While it may not be as powerful, it should be sound due to its simplicity. where clause statement…

rust-internals

Pass small structs by value or reference?

I have a struct: struct DocPos { block: Uuid, offset: usize, flags: u32 } And lots of functions around it, for example: fn doc_pos_to_utf16_index(pos: DocPos) -> Utf16Index fn compare_positions(&self, a: &DocPos, b: &DocPos) -> Ordering But they…

rust-users-forum

Buffer initialization does not get optimized out

I have the following snippet (minimization of a similar problem encountered in real code): const N: usize = 32; fn read(block: &[u8; 8 * N]) -> [u64; N] { let (chunks, tail) = block.as_chunks(); assert!(tail.is_empty()); let mut block = [0u64; N];…

rust-users-forum

Non dyn usable assoc type

hi folks! why does an assoc type with a Self: Sized bound non dyn usable? (I just crammed this fact and I don't know why exactly does it work this way....) trait Trait { type Foo where Self: Sized; fn foo(&self) -> Self::Foo where Self: Sized; fn…

rust-users-forum

How to slice a 3-dimensional array

I have a three-dimensional array like this: const XDIM = 60; const YDIM = 60; const ZDIM = 2; let mut world = [[[0.0; ZDIM] ; YDIM]; XDIM]; How would I extract all the X and Y contents for a single Z-value, giving me something like a variable of the…

rust-users-forum

What's structural pinning?

what's structural pinning and when is it okay to expose the field of a pinned struct? thanks! 4 posts - 2 participants Read full topic

rust-users-forum

Questions about HashMap's get_key_value

So I'm doing a silly thingy, with a HashMap keys of Vectors of references. I probably shouldn't, but am. During the program I wanted to get user input, find the key in the hashmap that matches, and store a reference to said key. It'd be lifetime…

rust-users-forum

Serde: I got lost between MapAccess, DeserializeSeed and PhantomData

I try to implement my own Serde deserializer for my non-default parsing problem. It is an educational project to sharpen my Rust skill, which means that I have real world use case, but my focus is on really understanding what's going on. I'll try to…

rust-users-forum

Problems with rustup

(topic deleted by author) 1 post - 1 participant Read full topic

rust-users-forum

Nested #[repr(c)] in rust struct

I have the following struct which I receive via ffi #[repr(C)] #[derive(Clone, Copy)] pub struct CDROM_TOC { pub Length: [u8; 2], pub FirstTrack: u8, pub LastTrack: u8, pub TrackData: [TRACK_DATA; 100], } #[repr(C)] #[derive(Clone, Copy)] pub struct…

rust-users-forum

Column width interaction of ansi_term and tabled crates

I've run into a problem formatting terminal output. I'm using the ansi_term and tabled crates together. Here's a minimal example: use ansi_term::Style; use tabled::{Table, Tabled}; #[derive(Tabled)] struct Row { column: String, } fn main() { let…

rust-users-forum

444 items available