pub struct RawFdContainer(_);
Expand description

A simple wrapper around RawFd that closes the fd on drop.

On non-unix systems, this type is empty and does not provide any method.

Implementations

Create a new RawFdContainer for the given RawFd.

The RawFdContainer takes ownership of the RawFd and closes it on drop.

Tries to clone the RawFdContainer creating a new FD with dup. The new RawFdContainer will take ownership of the duped version, whereas the original RawFdContainer will keep the ownership of its FD.

Get the RawFd out of this RawFdContainer.

This function would be an implementation of IntoRawFd if that were possible. However, it causes a conflict with an impl from libcore…

Consumes the RawFdContainer and closes the wrapped FD with the close system call.

This is similar to dropping the RawFdContainer, but it allows the caller to handle errors.

Trait Implementations

Extracts the raw file descriptor. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.

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.