Skip to main content

VpnConfig

Trait VpnConfig 

Source
pub trait VpnConfig:
    Sealed
    + Send
    + Sync
    + Debug {
    // Required methods
    fn vpn_kind(&self) -> VpnKind;
    fn name(&self) -> &str;
    fn dns(&self) -> Option<&[String]>;
    fn mtu(&self) -> Option<u32>;
    fn uuid(&self) -> Option<Uuid>;
}
Expand description

Common metadata shared by VPN connection configurations.

This trait is sealed and cannot be implemented outside of this crate. Use WireGuardConfig, OpenVpnConfig, or VpnConfiguration instead.

Required Methods§

Source

fn vpn_kind(&self) -> VpnKind

Returns whether this is a plugin VPN or kernel WireGuard.

Source

fn name(&self) -> &str

Returns the connection name.

Source

fn dns(&self) -> Option<&[String]>

Returns the configured DNS servers, if any.

Source

fn mtu(&self) -> Option<u32>

Returns the configured MTU, if any.

Source

fn uuid(&self) -> Option<Uuid>

Returns the configured UUID, if any.

Implementors§