Struct unsafe_io::UnsafeFile[][src]

#[repr(transparent)]
pub struct UnsafeFile(_);
Expand description

A non-owning unsafe I/O handle which on Windows is limited to handling what Windows considers to be RawHandles—mainly files and pipes.

Implementations

Like AsUnsafeHandle::as_unsafe_handle, but isn’t unsafe because it doesn’t imply a dereference.

Like IntoUnsafeHandle::into_unsafe_handle, but isn’t unsafe because it doesn’t imply a dereference.

Like AsRawHandle::as_raw_handle, but isn’t unsafe because it doesn’t imply a dereference.

Like IntoRawHandle::into_raw_handle, but isn’t unsafe because it doesn’t imply a dereference.

Like FromRawHandle::from_raw_handle, but isn’t unsafe because it doesn’t imply a dereference.

Trait Implementations

UnsafeFile doesn’t own its handle; see the comments for impl AsRawFd for UnsafeHandle.

Extracts the raw handle, without taking any ownership.

UnsafeFile doesn’t own its handle; see the comments for impl AsRawFd for UnsafeHandle.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

UnsafeFile doesn’t own its handle; see the comments for impl AsRawFd for UnsafeHandle.

Constructs a new I/O object from the specified raw handle. Read more

UnsafeFile doesn’t own its handle; see the comments for impl AsRawFd for UnsafeHandle.

Consumes this object, returning the raw underlying handle. Read more

UnsafeFile doesn’t own its handle; see the comments for impl AsRawFd for UnsafeHandle.

The Windows HANDLE type may be sent between threads (despite containing a *mut void, which in general isn’t Send).

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.