Module generic_channel

Module generic_channel 

Source
Expand description

Enum wrappers to be able to select different channel implementations at runtime.

Modulesยง

callback ๐Ÿ”’
Generic Callbacks
generic_channelset ๐Ÿ”’
lazy_callback ๐Ÿ”’
Lazy Callbacks
oneshot ๐Ÿ”’
shared_memory ๐Ÿ”’

Structsยง

CallbackSetter
GenericCallback
A mechanism to run a callback in the process this callback was constructed in.
GenericOneshotReceiver
The oneshot receiver struct
GenericOneshotSender
The oneshot sender struct
GenericReceiver
GenericReceiverSet
A GenericReceiverSet. Allows you to wait on multiple GenericReceivers. Automatically selects either Ipc or crossbeam depending on multiprocess mode.
GenericReceiverVisitor ๐Ÿ”’
GenericSender
A GenericSender that sends messages to a GenericReceiver.
GenericSenderVisitor ๐Ÿ”’
GenericSharedMemory
LazyCallback
Basic struct for LazyCallback

Enumsยง

GenericReceiverVariants ๐Ÿ”’
GenericSelectionResult
Result for readable events returned from GenericReceiverSet::select.
GenericSenderVariants ๐Ÿ”’
The actual GenericSender variant.
ReceiveError
SendError
TryReceiveError

Staticsยง

USE_IPC ๐Ÿ”’
Cache for being in Ipc Mode

Traitsยง

GenericSend
Abstraction of the ability to send a particular type of message cross-process. This can be used to ease the use of GenericSender sub-fields.

Functionsยง

channel
Creates a Servo channel that can select different channel implementations based on multiprocess mode or not. If the scenario doesnโ€™t require message to pass process boundary, a simple crossbeam channel is preferred.
lazy_callback
A LazyCallback is a Callback that will be initialized at a later date. We return the โ€˜LazyCallbackโ€™ which is a GenericCallback. We also return a โ€˜CallbackSetterโ€™ where the callback can be set at a later date.
new_generic_channel_crossbeam ๐Ÿ”’
Private helper function to create a crossbeam based channel.
new_generic_channel_ipc ๐Ÿ”’
oneshot
Creates a oneshot generic channel. This channel allows only a fixed capacity and might have other optimizations. The send and receive methods will consume the Sender/Receiver. We will automatically select ipc or crossbeam channels.
serialize_generic_sender_variants ๐Ÿ”’
to_receive_result
use_ipc ๐Ÿ”’
Return if we should be in IPC Mode

Type Aliasesยง

ReceiveResult
RoutedReceiver
RoutedReceiverReceiveResult
SendResult
TryReceiveResult