pub fn stream_pair() -> (LocalStream, LocalStream)
Expand description
Construct a new pair of linked LocalStream objects.
Any bytes written to one will be readable on the other, and vice versa. These streams will behave more or less like a socketpair, except without actually going through the operating system.
Note that this implementation is intended for testing only, and isn’t optimized.