connect

Function connect 

Source
pub fn connect<Stream: PipeStream>(
    pipe_name: impl AsRef<OsStr>,
    hostname: Option<impl AsRef<OsStr>>,
) -> Result<Stream>
👎Deprecated: poor ergonomics: you can’t use turbofish syntax due to impl AsRef<OsStr> parameters and you have to use None::<&OsStr> instead of just None to provide an empty hostname
Available on Windows only.
Expand description

Tries to connect to the specified named pipe (the \\.\pipe\ prefix is added automatically), returning a named pipe stream of the stream type provided via generic parameters. If there is no available server, returns immediately.

Since named pipes can work across multiple machines, an optional hostname can be supplied. Leave it at None if you’re using named pipes on the local machine exclusively, which is most likely the case.