Add is_null to documentation

This commit is contained in:
Sofia 2025-08-07 21:33:50 +03:00
parent 1a8535516c
commit ce2473a715

View File

@ -33,6 +33,14 @@ Returns a null-pointer of type `T`.
i32::null(); // Returns *i32 (null-ptr)
```
#### `<T>::is_null(val: T) -> bool`
Returns a boolean representing if `val` is a nullptr or not.
```rust
i32::is_null(i32::null()); // Returns true
```
#### `<T>::malloc(size: u64) -> *T`
Allocates `T::sizeof() * size` bytes and returns a pointer to `T`.