Crate hadean [] [src]

Bindings for Hadean

Structs

Channel

Zero or more channels are given to spawn(). At least one of src and dst must be of type ChannelType::Sibling(), and they cannot be the same.

Connection

TCP duplex connection.

Pid

Opaque "Process ID" – a reference to a process that can be sent around and ultimately handed to spawn.

Process

One or more Processs are given to spawn(). Each contains a function, and its arguments. The arguments are the only thing copied over, i.e. global variables are not, unlike Linux's fork.

Receiver

Receiving end of a channel. Either returned by spawn(), given to a newly-spawned worker in its arguments, or opened by the user to accept a newly-spawned ChannelType::Pid channel end.

Sender

Sending end of a channel. Either returned by spawn(), given to a newly-spawned worker in its arguments, or opened by the user to accept a newly-spawned ChannelType::Pid channel end.

Enums

ChannelType

ChannelType enum.

Traits

ProcessSend

Can be directly (de)serialised. Implemented for all types that don't contain pointers or references.

ProcessSendable

Can be (de)serialised. Implemented for all ProcessSend types, as well as those implemented manually, including String and Vec.

Functions

pid

Get the pid of this current process

spawn

Spawn one or more processes, and zero or more channels on those processes.