W3cubDocs

/Rust

Function std::ptr::null_mut

pub const fn null_mut<T>() -> *mut T

Creates a null mutable raw pointer.

Examples

use std::ptr;

let p: *mut i32 = ptr::null_mut();
assert!(p.is_null());

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ptr/fn.null_mut.html