windows_result/
lib.rs

1#![doc = include_str!("../readme.md")]
2#![debugger_visualizer(natvis_file = "../windows-result.natvis")]
3#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
4#![cfg_attr(not(windows), expect(unused_imports))]
5#![expect(
6    dead_code,
7    non_upper_case_globals,
8    non_snake_case,
9    non_camel_case_types,
10    clippy::upper_case_acronyms
11)]
12
13extern crate alloc;
14
15use alloc::{string::String, vec::Vec};
16
17mod bindings;
18use bindings::*;
19
20#[cfg(all(windows, not(windows_slim_errors)))]
21mod com;
22
23#[cfg(windows)]
24mod strings;
25#[cfg(windows)]
26use strings::*;
27
28#[cfg(all(windows, not(windows_slim_errors)))]
29mod bstr;
30
31mod error;
32pub use error::*;
33
34mod hresult;
35pub use hresult::HRESULT;
36
37mod bool;
38pub use bool::BOOL;
39
40/// A specialized [`Result`] type that provides Windows error information.
41pub type Result<T> = core::result::Result<T, Error>;