Represents a borrowed and valid Windows handle to a file-like object, such
as stdin/stdout/stderr or an actual file.
When a borrowed handle is dropped, then the underlying raw handle is
not closed. To get an owned handle, use Handle
.
Create a borrowed handle to stdin.
When the returned handle is dropped, stdin is not closed.
Create a handle to stdout.
When the returned handle is dropped, stdout is not closed.
Create a handle to stderr.
When the returned handle is dropped, stderr is not closed.
Create a borrowed handle to the given file.
When the returned handle is dropped, the file is not closed.
Create a borrowed handle from the given raw handle.
Note that unlike the FromRawHandle
trait, this constructor does
not consume ownership of the given handle. That is, when the
borrowed handle created by this constructor is dropped, the underlying
handle will not be closed.
This is unsafe because there is no guarantee that the given raw handle
is a valid handle. The caller must ensure this is true before invoking
this constructor.
Return this handle as a standard File
reference.
Return this handle as a standard File
mutable reference.
A borrowed handle that wraps the raw handle of the Self
object.
A convenience routine for extracting a HandleRef
from Self
, and then extracting a raw handle from the HandleRef
. Read more
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Extracts the raw handle, without taking any ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)