wireguard_conf/utils/mod.rs
1/// Collection of helper structs for creating [`Interface`]/[`Peer`]
2mod amnezia;
3mod keys;
4
5use thiserror::Error;
6
7pub use amnezia::*;
8pub use keys::*;
9
10#[derive(Error, Debug)]
11pub enum WireguardError {
12 #[error("invalid private key")]
13 InvalidPrivateKey,
14
15 #[error("invalid public key")]
16 InvalidPublicKey,
17
18 #[error("no private key provided")]
19 NoPrivateKeyProvided,
20
21 #[error("no assigned ip")]
22 NoAssignedIP
23}
24
25pub type WireguardResult<T> = Result<T, WireguardError>;