[−][src]Struct filedescriptor::OwnedHandle
OwnedHandle
allows managing the lifetime of the platform RawFileDescriptor
type. It is exposed in the interface of this crate primarily for convenience
on Windows where the system handle type is used for a variety of objects
that don't support reading and writing.
Methods
impl OwnedHandle
[src]
pub fn new<F: IntoRawFileDescriptor>(f: F) -> Self
[src]
Create a new handle from some object that is convertible into
the system RawFileDescriptor
type. This consumes the parameter
and replaces it with an OwnedHandle
instance.
pub fn try_clone(&self) -> Fallible<Self>
[src]
Attempt to duplicate the underlying handle and return an
OwnedHandle
wrapped around the duplicate. Since the duplication
requires kernel resources that may not be available, this is a
potentially fallible operation.
The returned handle has a separate lifetime from the source, but
references the same object at the kernel level.
pub fn dup<F: AsRawFileDescriptor>(f: &F) -> Fallible<Self>
[src]
Attempt to duplicate the underlying handle from an object that is
representable as the systemm RawFileDescriptor
type and return an
OwnedHandle
wrapped around the duplicate. Since the duplication
requires kernel resources that may not be available, this is a
potentially fallible operation.
The returned handle has a separate lifetime from the source, but
references the same object at the kernel level.
Trait Implementations
impl Drop for OwnedHandle
[src]
impl Send for OwnedHandle
[src]
impl Debug for OwnedHandle
[src]
impl AsRawHandle for OwnedHandle
[src]
fn as_raw_handle(&self) -> RawHandle
[src]
impl FromRawHandle for OwnedHandle
[src]
unsafe fn from_raw_handle(handle: RawHandle) -> Self
[src]
impl IntoRawHandle for OwnedHandle
[src]
fn into_raw_handle(self) -> RawHandle
[src]
Auto Trait Implementations
impl !Sync for OwnedHandle
Blanket Implementations
impl<T> AsRawFileDescriptor for T where
T: AsRawHandle,
[src]
T: AsRawHandle,
fn as_raw_file_descriptor(&Self) -> *mut c_void
[src]
impl<T> IntoRawFileDescriptor for T where
T: IntoRawHandle,
[src]
T: IntoRawHandle,
fn into_raw_file_descriptor(Self) -> *mut c_void
[src]
impl<T> FromRawFileDescriptor for T where
T: FromRawHandle,
[src]
T: FromRawHandle,
unsafe fn from_raw_file_descrptor(*mut c_void) -> T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,