safety_doc

Macro safety_doc 

Source
macro_rules! safety_doc {
    ($($reason:tt)*) => { ... };
}
Expand description

Helper macro for documenting unsafe blocks

Use this pattern in your code:

// SAFETY: This block is safe because:
// - Pointer `ptr` was validated via `validate_ptr()`
// - We have exclusive access to the memory
// - The length is checked to be within bounds
unsafe {
    std::slice::from_raw_parts(ptr, len)
}