Trait unsafe_io::OwnsRaw [−][src]
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.