std::ptr::null

Function std::ptr::null

pub fn null<T>() -> *const T

Creates a null raw pointer.

Examples

use std::ptr;

let p: *const i32 = ptr::null();
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.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部