pub const fn is_null<'a, T: ?Sized>(ptr: *const T) -> bool
Expand description
Const equivalent of
<*const>::is_null
ยงExample
use konst::ptr;
use core::ptr::null;
const NULL_IS_NULL: bool = unsafe{ ptr::is_null(null::<u8>()) };
const REFF_IS_NULL: bool = unsafe{ ptr::is_null(&100) };
assert_eq!(NULL_IS_NULL, true);
assert_eq!(REFF_IS_NULL, false);