Struct hello_world::HelloWorld

source ·
#[repr(C)]
pub(crate) struct HelloWorld { pub(crate) conf_object: ConfObject, pub message: String, }

Fields§

§conf_object: ConfObject§message: String

Implementations§

source§

impl HelloWorld

source

pub(crate) const CLASS: ClassInfo = _

source§

impl HelloWorld

source

pub const NAME: &'static str = "HelloWorld"

The name of the class

source§

impl HelloWorld

source

pub(crate) fn new(obj: *mut ConfObject, value: HelloWorld) -> *mut ConfObject

source§

impl HelloWorld

source

pub(crate) fn say(&self)

source§

impl HelloWorld

source

pub(crate) fn say2(&self)

Trait Implementations§

source§

impl ClassAlloc for HelloWorld

source§

unsafe fn alloc<T>(_cls: *mut conf_class) -> Result<*mut conf_object, Error>

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 Read more
source§

impl ClassCreate for HelloWorld

source§

fn create() -> Result<*mut ConfClass>

Create a class and register it in SIMICS. This does not instantiate the class by creating any objects, it only creates the (python) class that is used as a blueprint to instantiate the class
source§

impl ClassDealloc for HelloWorld

source§

unsafe fn dealloc(instance: *mut conf_object) -> Result<(), Error>

Called after all objects are deinitialized, this should free the allocated object using mm_free Read more
source§

impl ClassDeinit for HelloWorld

source§

unsafe fn deinit(_instance: *mut conf_object) -> Result<(), Error>

Called first on all objects being deleted, should do the opposite of init and deinitialize any additionally-allocated memory, destroy file descriptors, etc. The default implementation of this method does nothing Read more
source§

impl ClassFinalize for HelloWorld

source§

unsafe fn finalize(_instance: *mut conf_object) -> Result<(), Error>

Object can do final initialization that requires attribute values, but should avoid calling interface methods on other objects. The default implementation of this method does nothing Read more
source§

impl ClassInit for HelloWorld

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 Read more
source§

impl ClassObjectsFinalize for HelloWorld

source§

unsafe fn objects_finalized(_instance: *mut conf_object) -> Result<(), Error>

Called after object is fully constructed and can participate in simulation and reverse execution. May call interface methods on other objects here as part of initialization. The default implementation of this method does nothing Read more
source§

impl Default for HelloWorld

source§

fn default() -> HelloWorld

Returns the “default value” for a type. Read more
source§

impl<'x> From<*const conf_object> for &'x HelloWorld

source§

fn from(obj: *const ConfObject) -> &'x HelloWorld

Convert a raw ConfObject pointer to a reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

source§

impl<'x> From<*mut conf_object> for &'x HelloWorld

source§

fn from(obj: *mut ConfObject) -> &'x HelloWorld

Convert a raw ConfObject pointer to a mutable reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

source§

impl<'x> From<*mut conf_object> for &'x mut HelloWorld

source§

fn from(obj: *mut ConfObject) -> &'x mut HelloWorld

Convert a raw ConfObject pointer to a mutable reference to this object

§Safety

This function dereferences a raw pointer. It must be called with a valid pointer which has a sufficient lifetime.

source§

impl FromConfObject for HelloWorld

source§

unsafe fn from_conf_object<'a>(obj: *const conf_object) -> &'a Self

Get a reference to this object from a raw ConfObject pointer Read more
source§

unsafe fn from_conf_object_mut<'a>(obj: *mut conf_object) -> &'a mut Self

Get a mutable reference to this object from a raw ConfObject pointer Read more
source§

impl Class for HelloWorld

source§

impl HasInterface<HelloWorldInterface> for HelloWorld

source§

impl HasInterface<HelloWorldInterface2> for HelloWorld

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.