pub trait ClassAlloc {
// Provided method
unsafe fn alloc<T>(_cls: *mut ConfClass) -> Result<*mut ConfObject> { ... }
}
Expand description
A class instance can allocated
Provided Methods§
sourceunsafe fn alloc<T>(_cls: *mut ConfClass) -> Result<*mut ConfObject>
unsafe fn alloc<T>(_cls: *mut ConfClass) -> Result<*mut ConfObject>
Allocates an instance of the object using mm_zalloc and returns a pointer to the
allocated object, whose first entry is the ConfObject
instance associated with it
§Safety
This method is unsafe because it may dereference a raw pointer. It is up to the implementation of this method to ensure that the pointer is valid.
Object Safety§
This trait is not object safe.