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

impl UnsafeFile[src]

#[must_use]
pub const fn as_unowned_unsafe_handle(self) -> UnsafeHandle
[src]

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

#[must_use]
pub const fn into_unowned_unsafe_handle(self) -> UnsafeHandle
[src]

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

#[must_use]
pub const fn as_unowned_raw_handle(self) -> RawHandle
[src]

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

#[must_use]
pub const fn into_unowned_raw_handle(self) -> RawHandle
[src]

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

pub const fn unowned_from_raw_handle(raw_handle: RawHandle) -> Self[src]

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

Trait Implementations

impl AsRawHandle for UnsafeFile[src]

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

fn as_raw_handle(&self) -> RawHandle[src]

Extracts the raw handle, without taking any ownership.

impl AsRawHandleOrSocket for UnsafeFile[src]

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

impl Clone for UnsafeFile[src]

fn clone(&self) -> UnsafeFile[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for UnsafeFile[src]

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

Formats the value using the given formatter. Read more

impl FromRawHandle for UnsafeFile[src]

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

unsafe fn from_raw_handle(raw_handle: RawHandle) -> Self[src]

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

impl IntoRawHandle for UnsafeFile[src]

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

fn into_raw_handle(self) -> RawHandle[src]

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

impl IntoRawHandleOrSocket for UnsafeFile[src]

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

impl Copy for UnsafeFile[src]

impl Send for UnsafeFile[src]

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

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

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.