1use std::{
2 error::Error,
3 fmt::{Debug, Display, Formatter},
4 path::PathBuf,
5};
6
7mod convert;
8mod display;
9
10pub type WxResult<T> = Result<T, WxError>;
12
13pub struct WxError {
15 kind: Box<WxErrorKind>,
16}
17
18#[derive(Debug)]
20pub enum WxErrorKind {
21 #[cfg(windows)]
23 Window {
24 error: windows::core::Error,
26 },
27 UnsupportedOffset {
29 version: String,
31 field: String,
33 },
34 InvalidKey {
36 key: [u8; 32],
38 path: PathBuf,
40 },
41 DatabaseError {
43 error: sqlx::Error,
45 },
46 DecodeError {
48 algorithm: &'static str,
50 message: String,
52 },
53 Custom {
55 message: String,
57 },
58}