pub trait Interface {
type InternalInterface: Default;
type Name: AsRawCstr;
const NAME: Self::Name;
// Required method
fn new(
obj: *mut ConfObject,
interface: *mut Self::InternalInterface,
) -> Self;
// Provided methods
fn register(cls: *mut ConfClass) -> Result<()>
where Self: Sized { ... }
fn get(obj: *mut ConfObject) -> Result<Self>
where Self: Sized { ... }
}
Expand description
A SIMICS interface containing a number of methods that can be called on an object
Required Associated Constants§
Required Associated Types§
sourcetype InternalInterface: Default
type InternalInterface: Default
The inner interface type, which is a struct of nullable extern “C” function pointers and must be default constructable as all NULL pointers (i.e. None values)
Required Methods§
sourcefn new(obj: *mut ConfObject, interface: *mut Self::InternalInterface) -> Self
fn new(obj: *mut ConfObject, interface: *mut Self::InternalInterface) -> Self
Create a new instance of this interface
Provided Methods§
Object Safety§
This trait is not object safe.