pub struct ByteWriterPipeStream { /* private fields */ }
Available on Windows only.
Expand description

Byte stream writer for a named pipe.

Created either by using PipeListener or by connecting to a named pipe server.

Implementations

Connects to the specified named pipe (the \\.\pipe\ prefix is added automatically), blocking until a server instance is dispatched.

Connects to the specified named pipe at a remote computer (the \\<hostname>\pipe\ prefix is added automatically), blocking until a server instance is dispatched.

Sets whether the nonblocking mode for the pipe stream is enabled. By default, it is disabled.

In nonblocking mode, attempts to read from the pipe when there is no data available or to write when the buffer has filled up because the receiving side did not read enough bytes in time will never block like they normally do. Instead, a WouldBlock error is immediately returned, allowing the thread to perform useful actions in the meantime.

If called on the server side, the flag will be set only for one stream instance. A listener creation option, nonblocking, and a similar method on the listener, set_nonblocking, can be used to set the mode in bulk for all current instances and future ones.

Returns true if the stream was created by a listener (server-side), false if it was created by connecting to a server (server-side).

Returns true if the stream was created by connecting to a server (client-side), false if it was created by a listener (server-side).

Retrieves the process identifier of the client side of the named pipe connection.

Retrieves the session identifier of the client side of the named pipe connection.

Retrieves the process identifier of the server side of the named pipe connection.

Retrieves the session identifier of the server side of the named pipe connection.

Disconnects the named pipe stream without flushing buffers, causing all data in those buffers to be lost. This is much faster (and, in some case, the only finite-time way of ending things) than simply dropping the stream, since, for non-async named pipes, the Drop implementation flushes first.

Only makes sense for server-side pipes and will return an error if called on a client stream. For async pipe streams, this is the same as dropping the pipe.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
The data stream flow direction for the pipe. See the PipeStreamRole enumeration for more on what this means.
The data stream mode for the pipe. If set to PipeMode::Bytes, message boundaries will broken and having READ_MODE at PipeMode::Messages would be a pipe creation error. Read more
The data stream mode used when reading from the pipe: if WRITE_MODE is PipeMode::Messages and READ_MODE is PipeMode::Bytes, the message boundaries will be destroyed when reading even though they are retained when written. See the PipeMode enumeration for more on what those modes mean. Read more
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Like write, except that it writes from a slice of buffers. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
Attempts to write an entire buffer into this writer. Read more
🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts to T by calling Into<T>::into.
Tries to convert to T by calling TryInto<T>::try_into.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.