pub enum TunnelKey {
Simple(String),
Complex {
input: Option<String>,
output: Option<String>,
private: Option<String>,
},
}
Expand description
Define keys to use for the tunnel. The key can be a number or a dotted quad (an IPv4 address). For wireguard it can be a base64-encoded private key or (as of networkd v242+) an absolute path to a file, containing the private key (since 0.100). It is used for identification of IP transforms. This is only required for vti and vti6 when using the networkd backend, and for gre or ip6gre tunnels when using the NetworkManager backend.
This field may be used as a scalar (meaning that a single key is specified and to be used for input, output and private key), or as a mapping, where you can further specify input/output/private.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TunnelKey
impl<'de> Deserialize<'de> for TunnelKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TunnelKey
impl StructuralPartialEq for TunnelKey
Auto Trait Implementations§
impl Freeze for TunnelKey
impl RefUnwindSafe for TunnelKey
impl Send for TunnelKey
impl Sync for TunnelKey
impl Unpin for TunnelKey
impl UnwindSafe for TunnelKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more