將原始指標初始化為 null

與普通的 Rust 引用不同,允許原始指標採用空值。

use std::ptr;

// Create a const NULL pointer
let null_ptr: *const u16 = ptr::null();

// Create a mutable NULL pointer
let mut_null_ptr: *mut u16 = ptr::null_mut();