Pipe

public struct Pipe<C> : SinkConvertible, StreamConvertible where C : ChannelProtocol

Bundles together the sending and receiving sides of a channel.

The channel is kept open for as long as the pipe is kept alive. You may obtain separate handles to each side using Pipe.split(), let the pipe go and manage each side lifetime separately. This is useful when the sender and receiver have different lifetimes; dropping either side closes the channel.

Pipe is typically known as Subject in other frameworks.