Module channel

Source
Expand description

One-way, multi-process, typed communication channels. These are used to send messages between mailboxes residing in different processes.

Modules§

sim
Local simulated channel implementation.

Structs§

ChannelRx
Universal channel receiver.
ChannelTx
Universal channel transmitter.
SendError
An error that occurred during send. Returns the message that failed to send.

Enums§

ChannelAddr
The type of a channel address, used to multiplex different underlying channel implementations. ChannelAddrs also have a concrete syntax: the address type (e.g., “tcp” or “local”), followed by “:”, and an address parseable to that type. For example:
ChannelError
The type of error that can occur on channel operations.
ChannelTransport
Types of channel transports.
TlsMode
The hostname to use for TLS connections.
TxStatus
The possible states of a Tx.

Traits§

Rx
The receive end of an M-typed channel.
Tx
The transmit end of an M-typed channel.

Functions§

dial
Dial the provided address, returning the corresponding Tx, or error if the channel cannot be established. The underlying connection is dropped whenever the returned Tx is dropped.
serve
Serve on the provided channel address. The server is turned down when the returned Rx is dropped.
serve_local
Serve on the local address. The server is turned down when the returned Rx is dropped.

Type Aliases§

Hostname
The type of (TCP) hostnames.
Port
The type of (TCP) ports.