Skip to main content

rust_expr_for_key

Function rust_expr_for_key 

Source
pub fn rust_expr_for_key(key: &str) -> String
Expand description

Maps an offset key to its Rust const expression.

sizeof T becomes size_of::<T>(), Struct::field becomes offset_of!(Struct, field), and const forms pass their expr as is.