/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

com.micahrl.me
| | qsantos.fr
11.0 parsecs away

Travel
| | This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec, &Vec with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the stack &[T; N] (array reference)Example: &[i32; 100]N is tracked at ... Continue reading Rust Strings for C Programmers
| | ricardo.cc
8.9 parsecs away

Travel
| | Stories about code, design, coffee and other good stuff.
| | me.micahrl.com
0.0 parsecs away

Travel
| | All rituals restricted. All rites reserved.
| | boats.gitlab.io
28.4 parsecs away

Travel
| Today I realized a new crate called pin-cell. This crate contains a type called PinCell, which is a kind of cell that is similar to RefCell, but only can allow pinned mutable references into its interior. Right now, the crate is nightly only and no-std compatible. How is the API of PinCell different from RefCell? When you call borrow_mut on a RefCell, you get a type back that implements DerefMut, allowing you to mutate the interior value.