Trait simics::api::traits::class::ClassInit

source ·
pub trait ClassInit {
    // Provided method
    unsafe fn init(instance: *mut ConfObject) -> Result<*mut ConfObject> { ... }
}
Expand description

A class can be initialized

Provided Methods§

source

unsafe fn init(instance: *mut ConfObject) -> Result<*mut ConfObject>

Perform class specific instantiation, set default values for attributes. May allocate additional memory if co-allocation is not used. Attribute setters are called after this function returns. The default implementation returns the object without modification. Returning NULL from this function indicates an error

§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.

Implementors§