Malloc

Trait Malloc 

Source
pub trait Malloc: Sized {
    // Required method
    fn malloc(size: usize) -> Self;
}
Expand description

Extension to Unique for use with malloc

Required Methods§

Source

fn malloc(size: usize) -> Self

Creates new memory using malloc

§Panics:
  • When malloc returns 0

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§