Struct lunatic::ThisModule[][src]

pub struct ThisModule { /* fields omitted */ }
Expand description

A pointer to the current module.

This type is useful because it allows us to spawn existing functions by reference into a new environment. This is only possible if we are running inside the module we are spawning the processes from, otherwise we could not reference them by table id.

Implementations

Spawns a new process from a function.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents.

Spawns a new process from a function and links it to the parent.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents.

Spawns a new process from a function and links it to the parent.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents.

If the linked process dies, the parent is going to die too.

Spawns a new process from a function and context.

  • context is data that we want to pass to the newly spawned process. It needs to impl. the [Serialize + DeserializeOwned] trait.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents. The first argument of this function is going to be the received context.

Spawns a new process from a function and context, and links it to the parent.

  • context is data that we want to pass to the newly spawned process. It needs to impl. the [Serialize + DeserializeOwned] trait.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents. The first argument of this function is going to be the received context.

Spawns a new process from a function and context, and links it to the parent.

  • context is data that we want to pass to the newly spawned process. It needs to impl. the [Serialize + DeserializeOwned] trait.

  • function is the starting point of the new process. The new process doesn’t share memory with its parent, because of this the function can’t capture anything from parents. The first argument of this function is going to be the received context.

If the linked process dies, the parent is going to die too.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.