summaryrefslogtreecommitdiffhomepage
path: root/talpid-tunnel/src/tun_provider/stub.rs
blob: 6fa4436c51ab256de0a67357523e6e9190548f5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use super::TunConfig;

#[derive(Debug, thiserror::Error)]
/// Error stub.
pub enum Error {
    /// IO error
    #[error("IO error")]
    Io(#[from] std::io::Error),
}

/// Factory stub of tunnel devices.
pub struct StubTunProvider;

impl StubTunProvider {
    pub fn new(_: TunConfig) -> Self {
        StubTunProvider
    }

    pub fn open_tun(&mut self) -> Result<(), Error> {
        unimplemented!();
    }
}