# Struct mio::net::UnixListener [−] [src]

    pub struct UnixListener { /* fields omitted */ }

A non-blocking Unix domain socket server.

## Implementations

### `impl UnixListener` [src]

#### `pub fn bind<P: AsRef<Path>>(path: P) -> Result<UnixListener>` [src]

Creates a new `UnixListener` bound to the specified socket.

#### `pub fn from_std(listener: UnixListener) -> UnixListener` [src]

Creates a new `UnixListener` from a standard `net::UnixListener`.

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

#### `pub fn accept(&self) -> Result<(UnixStream, SocketAddr)>` [src]

Accepts a new incoming connection to this listener.

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

#### `pub fn local_addr(&self) -> Result<SocketAddr>` [src]

Returns the local socket address of this listener.

#### `pub fn take_error(&self) -> Result<Option<Error>>` [src]

Returns the value of the `SO_ERROR` option.

## Trait Implementations

### `impl AsRawFd for UnixListener` [src]

#### `fn as_raw_fd(&self) -> RawFd` [src]

Extracts the raw file descriptor. Read more

### `impl Debug for UnixListener` [src]

#### `fn fmt(&self, f: &mut Formatter<'_>) -> Result` [src]

Formats the value using the given formatter. Read more

### `impl FromRawFd for UnixListener` [src]

#### `unsafe fn from_raw_fd(fd: RawFd) -> UnixListener` [src]

Converts a `RawFd` to a `UnixListener`.

# Notes

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

### `impl IntoRawFd for UnixListener` [src]

#### `fn into_raw_fd(self) -> RawFd` [src]

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

### `impl Source for UnixListener` [src]

#### `fn register(
&mut self,
registry: &Registry,
token: Token,
interests: Interest
) -> Result<()>` [src]

Register `self` with the given `Registry` instance. Read more

#### `fn reregister(
&mut self,
registry: &Registry,
token: Token,
interests: Interest
) -> Result<()>` [src]

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

#### `fn deregister(&mut self, registry: &Registry) -> Result<()>` [src]

Deregister `self` from the given `Registry` instance. Read more

## Auto Trait Implementations

### `impl RefUnwindSafe for UnixListener`

### `impl Send for UnixListener`

### `impl Sync for UnixListener`

### `impl Unpin for UnixListener`

### `impl UnwindSafe for UnixListener`

## Blanket Implementations

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `pub fn type_id(&self) -> TypeId` [src]

Gets the `TypeId` of `self`. Read more

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow(&self) -> &T` [src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `pub fn borrow_mut(&mut self) -> &mut T` [src]

Mutably borrows from an owned value. Read more

### `impl<T> From<T> for T` [src]

#### `pub fn from(t: T) -> T` [src]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `pub fn into(self) -> U` [src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

#### `pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` [src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

#### `pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` [src]

Performs the conversion.