Function tokio::runtime::task::raw::get_core_offset

source ยท
const fn get_core_offset(header_size: usize, core_align: usize) -> usize
Expand description

Compute the offset of the Core<T, S> field in Cell<T, S> using the #[repr(C)] algorithm.

Pseudo-code for the #[repr(C)] algorithm can be found here: https://doc.rust-lang.org/reference/type-layout.html#reprc-structs