[][src]Struct lunatic::process::Process

pub struct Process { /* fields omitted */ }

A process consists of its own stack and heap. It can only share data with other processes by exchanging the data with messages passing.

Implementations

impl Process[src]

pub fn spawn<'de, T>(
    context: T,
    function: fn(_: T)
) -> Result<Process, SpawnError> where
    T: Serialize + Deserialize<'de>, 
[src]

Spawn a new process from a function and cotext. function is going to be starting point of the new process. context is some data that we want to pass to the newly spawned process.

pub fn join(self)[src]

Wait on a process to finish.

Trait Implementations

impl Drop for Process[src]

Auto Trait Implementations

impl RefUnwindSafe for Process

impl Send for Process

impl Sync for Process

impl Unpin for Process

impl UnwindSafe for Process

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.