diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs new file mode 100644 index 0000000..e202dfa --- /dev/null +++ b/src/error.rs @@ -0,0 +1,12 @@ +// Copyright © 2022 Kim Altintop <kim@eagain.io> +// SPDX-License-Identifier: GPL-2.0-only WITH openvpn-openssl-exception + +pub type Error = anyhow::Error; +pub type Result<T> = anyhow::Result<T>; + +#[derive(Debug, thiserror::Error)] +#[error("{what} not found in {whence}")] +pub struct NotFound<T, U> { + pub what: T, + pub whence: U, +} |