doc.rust-lang.org
pub trait IntoRawSocket
A trait to express the ability to consume an object and acquire ownership of its raw SOCKET.
trait
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
fn into_raw_handle(self) -> RawHandle
Consumes this object, returning the raw underlying handle.
method
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait IntoRawHandle
A trait to express the ability to consume an object and acquire ownership of its raw HANDLE.
trait
std
Stable since 1.4.0
Version 1.100.0-nightly
doc.rust-lang.org
unsafe fn from_raw_socket(sock: RawSocket) -> Self
Constructs a new I/O object from the specified raw socket.
associated_function
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait FromRawSocket
Creates I/O objects from raw sockets.
trait
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
unsafe fn from_raw_handle(handle: RawHandle) -> Self
Constructs a new I/O object from the specified raw handle.
associated_function
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait FromRawHandle
Constructs I/O objects from raw handles.
trait
std
Stable since 1.1.0
Version 1.100.0-nightly
doc.rust-lang.org
fn as_raw_socket(&self) -> RawSocket
Extracts the raw socket.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait AsRawSocket
Extracts raw sockets.
trait
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
fn as_raw_handle(&self) -> RawHandle
Extracts the raw handle.
method
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub trait AsRawHandle
Extracts raw handles.
trait
std
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone(&self) -> io::Result<Self>
Creates a new OwnedHandle instance that shares the same underlying object as the existing OwnedHandle instance.
method
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct OwnedHandle
An owned handle.
struct
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct NullHandleError
This is the error type used by HandleOrNull when attempting to convert into a handle, to indicate that the value is null.
struct
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct InvalidHandleError
This is the error type used by HandleOrInvalid when attempting to convert into a handle, to indicate that the value is INVALID_HANDLE_VALUE.
struct
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn from_raw_handle(handle: RawHandle) -> Self
Constructs a new instance of Self from the given RawHandle returned from a Windows API that uses null to indicate failure, such as CreateThread.
associated_function
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct HandleOrNull
FFI type for handles in return values or out parameters, where NULL is used as a sentry value to indicate errors, such as in the return value of CreateThread. This uses repr(transparent) and has the representation of a host handle, so that it can be used in such FFI declarations.
struct
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub unsafe fn from_raw_handle(handle: RawHandle) -> Self
Constructs a new instance of Self from the given RawHandle returned from a Windows API that uses INVALID_HANDLE_VALUE to indicate failure, such as CreateFileW.
associated_function
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub struct HandleOrInvalid
FFI type for handles in return values or out parameters, where INVALID_HANDLE_VALUE is used as a sentry value to indicate errors, such as in the return value of CreateFileW. This uses repr(transparent) and has the representation of a host handle, so that it can be used in such FFI declarations.
struct
std
Stable since 1.63.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn try_clone_to_owned(&self) -> io::Result<OwnedHandle>
Creates a new OwnedHandle instance that shares the same underlying object as the existing BorrowedHandle instance.
method
std
Stable since 1.63.0
Version 1.100.0-nightly