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

1.63.0 · source ·
pub trait AsHandle {
    fn as_handle(&self) -> BorrowedHandle<'_>;
}
Available on Windows only.
Expand description

A trait to borrow the handle from an underlying object.

Required Methods§

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();
Run

Implementors§