Trait unsafe_io::OwnsRaw[][src]

pub unsafe trait OwnsRaw { }

Assert that a type owns its raw file descriptor or handle.

The AsRaw* and IntoRaw* traits by themselves are not sufficient to describe the ownership of the file descriptor or handle, as they aren't unsafe to implement. See the discussion in rust-lang/rust#76969 for additional background. The UnsafeHandle type provided by this crate serves as an implementation of this suggestion.

OwnsRaw is a trait that types can implement to declare that they do own their file descriptors or handles.

Safety

Types implementing OwnsRaw must own the file desctiptors or handles they return in their AsRaw* and IntoRaw* implementations.

Implementations on Foreign Types

impl OwnsRaw for Stdin[src]

impl OwnsRaw for StdinLock<'_>[src]

impl OwnsRaw for Stdout[src]

impl OwnsRaw for StdoutLock<'_>[src]

impl OwnsRaw for Stderr[src]

impl OwnsRaw for StderrLock<'_>[src]

impl OwnsRaw for File[src]

impl OwnsRaw for ChildStdin[src]

impl OwnsRaw for ChildStdout[src]

impl OwnsRaw for ChildStderr[src]

impl OwnsRaw for TcpStream[src]

impl OwnsRaw for TcpListener[src]

impl OwnsRaw for UdpSocket[src]

impl OwnsRaw for UnixStream[src]

impl OwnsRaw for UnixListener[src]

impl OwnsRaw for UnixDatagram[src]

Loading content...

Implementors

Loading content...