Rust Internals
Get the offset of a field from the base of a struct
language design
Unsafe Code Guidelines
JeffBurdges
March 4, 2021, 9:19am
2
See
Need for -> operator for Unsafe Code Guidelines
via
Raw pointer field projection
1 Like
show post in topic
Related topics
Topic
Replies
Views
Activity
Discussion on offset_of!(..)
12
6578
January 25, 2019
[Pre-RFC] Add a new offset_of macro to core::mem
131
14806
November 4, 2019
Offset_of_val!
libs
19
843
February 9, 2026
Pre-RFC: Struct/union raw pointer field access
language design
10
2232
January 3, 2020
Pre-Pre-RFC: Field offsets
language design
6
1854
July 2, 2018