Skip to main content

IntoRawFd

Trait IntoRawFd 

1.4.0 · Source
pub trait IntoRawFd {
    // Required method
    fn into_raw_handle(self) -> *mut c_void;
}
Expand description

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

Required Methods§

1.4.0 · Source

fn into_raw_handle(self) -> *mut c_void

Consumes this object, returning the raw underlying handle.

This function is typically used to transfer ownership of the underlying handle to the caller. When used in this way, callers are then the unique owners of the handle and must close it once it’s no longer needed.

However, transferring ownership is not strictly required. Use a Into<OwnedHandle>::into implementation for an API which strictly transfers ownership.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

1.4.0 · Source§

impl IntoRawHandle for Child

1.4.0 · Source§

impl IntoRawHandle for ChildStderr

1.4.0 · Source§

impl IntoRawHandle for ChildStdin

1.4.0 · Source§

impl IntoRawHandle for ChildStdout

Source§

impl IntoRawHandle for Dir

1.4.0 · Source§

impl IntoRawHandle for File

§

impl IntoRawHandle for Handle

§

impl IntoRawHandle for Handle

1.63.0 · Source§

impl IntoRawHandle for OwnedHandle

1.87.0 · Source§

impl IntoRawHandle for PipeReader

1.87.0 · Source§

impl IntoRawHandle for PipeWriter

1.9.0 · Source§

impl<T> IntoRawHandle for JoinHandle<T>

§

impl<T> IntoRawHandle for ScopedJoinHandle<'_, T>