# Module rustix::fd

source · [−]
Expand description

Export the `*Fd` types and traits that are used in rustix’s public API.

Users can use this to avoid needing to import anything else to use the same versions of these types and traits.

## Structs

BorrowedFd

A borrowed file descriptor.

OwnedFd

An owned file descriptor.

## Traits

AsFd

A trait to borrow the file descriptor from an underlying object.

AsRawFd

A trait to extract the raw file descriptor from an underlying object.

FromRawFd

A trait to express the ability to construct an object from a raw file descriptor.

IntoRawFd

A trait to express the ability to consume an object and acquire ownership of its raw file descriptor.

## Type Definitions

RawFd

Raw file descriptors.