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]
impl UnsafeFile[src]#[must_use]pub const fn as_unowned_unsafe_handle(self) -> UnsafeHandle[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]
#[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]
#[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]
#[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]
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]
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]
fn as_raw_handle(&self) -> RawHandle[src]Extracts the raw handle, without taking any ownership.
impl AsRawHandleOrSocket for UnsafeFile[src]
impl AsRawHandleOrSocket for UnsafeFile[src]UnsafeFile doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
fn as_raw_handle_or_socket(&self) -> RawHandleOrSocket[src]
fn as_raw_handle_or_socket(&self) -> RawHandleOrSocket[src]Like AsRawHandle::as_raw_handle and AsRawSocket::as_raw_socket
but can return either type. Read more
impl Clone for UnsafeFile[src]
impl Clone for UnsafeFile[src]fn clone(&self) -> 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]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for UnsafeFile[src]
impl Debug for UnsafeFile[src]impl FromRawHandle for UnsafeFile[src]
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]
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]
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]
fn into_raw_handle(self) -> RawHandle[src]Consumes this object, returning the raw underlying handle. Read more
impl IntoRawHandleOrSocket for UnsafeFile[src]
impl IntoRawHandleOrSocket for UnsafeFile[src]UnsafeFile doesn’t own its handle; see the comments for
impl AsRawFd for UnsafeHandle.
fn into_raw_handle_or_socket(self) -> RawHandleOrSocket[src]
fn into_raw_handle_or_socket(self) -> RawHandleOrSocket[src]Like IntoRawHandle::into_raw_handle and
IntoRawSocket::into_raw_socket but can return either type. Read more
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
impl RefUnwindSafe for UnsafeFile
impl !Sync for UnsafeFile
impl Unpin for UnsafeFile
impl UnwindSafe for UnsafeFile
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
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]
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