Debian Codegraph @

third_party/rust/windows-result/src/lib.rs

raw
1 /*!
2 Learn more about Rust for Windows here: <https://github.com/microsoft/windows-rs>
3 */
4
5 #![cfg_attr(
6 windows_debugger_visualizer,
7 debugger_visualizer(natvis_file = "../.natvis")
8 )]
9 #![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
10 #![cfg_attr(not(windows), allow(unused_imports))]
11
12 extern crate alloc;
13
14 #[allow(unused_imports)]
15 use alloc::{string::String, vec::Vec};
16
17 mod bindings;
18 use bindings::*;
19
20 #[cfg(all(windows, not(windows_slim_errors)))]
21 mod com;
22
23 #[cfg(windows)]
24 mod strings;
25 #[cfg(windows)]
26 use strings::*;
27
28 #[cfg(all(windows, not(windows_slim_errors)))]
29 mod bstr;
30
31 mod error;
32 pub use error::*;
33
34 mod hresult;
35 pub use hresult::HRESULT;
36
37 /// A specialized [`Result`] type that provides Windows error information.
38 pub type Result<T> = core::result::Result<T, Error>;