[][src]Struct uapi::OwnedFd

#[repr(transparent)]pub struct OwnedFd { /* fields omitted */ }

An owned file descriptor

Upon Drop, the contained file descriptor will be closed. Errors from close() are ignored.

The contained file descriptor can be accessed via deref: *self.

This struct can be converted From and Into various std types.

Implementations

impl OwnedFd[src]

pub fn new(raw: c_int) -> OwnedFd

Notable traits for OwnedFd

impl Read for OwnedFdimpl Write for OwnedFd
[src]

pub fn borrow(&self) -> Fd

Notable traits for Fd

impl Read for Fdimpl Write for Fd
[src]

Shortcut for Fd::new(*self)

pub fn unwrap(self) -> c_int[src]

Returns *self and does not run Drop

pub fn raw(&self) -> c_int[src]

Returns *self

Trait Implementations

impl Debug for OwnedFd[src]

impl Deref for OwnedFd[src]

type Target = c_int

The resulting type after dereferencing.

impl Drop for OwnedFd[src]

impl Eq for OwnedFd[src]

impl From<ChildStderr> for OwnedFd[src]

impl From<ChildStdin> for OwnedFd[src]

impl From<ChildStdout> for OwnedFd[src]

impl From<File> for OwnedFd[src]

impl From<OwnedFd> for File[src]

impl From<OwnedFd> for TcpListener[src]

impl From<OwnedFd> for TcpStream[src]

impl From<OwnedFd> for UdpSocket[src]

impl From<OwnedFd> for UnixDatagram[src]

impl From<OwnedFd> for UnixStream[src]

impl From<OwnedFd> for UnixListener[src]

impl From<OwnedFd> for Stdio[src]

impl From<TcpListener> for OwnedFd[src]

impl From<TcpStream> for OwnedFd[src]

impl From<UdpSocket> for OwnedFd[src]

impl From<UnixDatagram> for OwnedFd[src]

impl From<UnixListener> for OwnedFd[src]

impl From<UnixStream> for OwnedFd[src]

impl Packed for OwnedFd[src]

impl PartialEq<Fd> for OwnedFd[src]

impl PartialEq<OwnedFd> for OwnedFd[src]

impl PartialEq<OwnedFd> for Fd[src]

impl Pod for OwnedFd[src]

impl Read for OwnedFd[src]

impl StructuralEq for OwnedFd[src]

impl StructuralPartialEq for OwnedFd[src]

impl Write for OwnedFd[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.

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.