Struct mio::net::UnixStream[][src]

pub struct UnixStream { /* fields omitted */ }
This is supported on crate feature net only.
Expand description

A non-blocking Unix stream socket.

Implementations

This is supported on Unix only.

Connects to the socket named by path.

This is supported on Unix only.

Creates a new UnixStream from a standard net::UnixStream.

This function is intended to be used to wrap a Unix stream from the standard library in the Mio equivalent. The conversion assumes nothing about the underlying stream; it is left up to the user to set it in non-blocking mode.

Note

The Unix stream here will not have connect called on it, so it should already be connected via some other means (be it manually, or the standard library).

This is supported on Unix only.

Creates an unnamed pair of connected sockets.

Returns two UnixStreams which are connected to each other.

This is supported on Unix only.

Returns the socket address of the local half of this connection.

This is supported on Unix only.

Returns the socket address of the remote half of this connection.

This is supported on Unix only.

Returns the value of the SO_ERROR option.

This is supported on Unix only.

Shuts down the read, write, or both halves of this connection.

This function will cause all pending and future I/O calls on the specified portions to immediately return with an appropriate value (see the documentation of Shutdown).

Trait Implementations

Extracts the raw file descriptor. Read more

Formats the value using the given formatter. Read more

Converts a RawFd to a UnixStream.

Notes

The caller is responsible for ensuring that the socket is in non-blocking mode.

Consumes this object, returning the raw underlying file descriptor. Read more

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

Like read, except that it reads into a slice of buffers. Read more

🔬 This is a nightly-only experimental API. (can_vector)

Determines if this Reader has an efficient read_vectored implementation. Read more

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read all bytes until EOF in this source, appending them to buf. Read more

Read the exact number of bytes required to fill buf. Read more

Creates a “by reference” adapter for this instance of Read. Read more

Transforms this Read instance to an Iterator over its bytes. Read more

Creates an adapter which will chain this stream with another. Read more

Creates an adapter which will read at most limit bytes from it. Read more

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

Like read, except that it reads into a slice of buffers. Read more

🔬 This is a nightly-only experimental API. (can_vector)

Determines if this Reader has an efficient read_vectored implementation. Read more

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

Read all bytes until EOF in this source, placing them into buf. Read more

Read all bytes until EOF in this source, appending them to buf. Read more

Read the exact number of bytes required to fill buf. Read more

Creates a “by reference” adapter for this instance of Read. Read more

Transforms this Read instance to an Iterator over its bytes. Read more

Creates an adapter which will chain this stream with another. Read more

Creates an adapter which will read at most limit bytes from it. Read more

Register self with the given Registry instance. Read more

Re-register self with the given Registry instance. Read more

Deregister self from the given Registry instance. Read more

Write a buffer into this writer, returning how many bytes were written. Read more

Like write, except that it writes from a slice of buffers. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. 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

Write a buffer into this writer, returning how many bytes were written. Read more

Like write, except that it writes from a slice of buffers. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. 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

Performs the conversion.

Performs the conversion.

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.