Trait std::os::windows::io::AsHandle

pub trait AsHandle {
    fn as_handle(&self) -> BorrowedHandle<'_>;
}
???? This is a nightly-only experimental API. (io_safety #87074)
This is supported on Windows only.

A trait to borrow the handle from an underlying object.

Required methods

???? This is a nightly-only experimental API. (io_safety #87074)

Borrows the handle.

Example

use std::fs::File;
use std::os::windows::io::{AsHandle, BorrowedHandle};

let mut f = File::open("foo.txt")?;
let borrowed_handle: BorrowedHandle<'_> = f.as_handle();

Implementors

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/os/windows/io/trait.AsHandle.html