pub struct WgSocket { /* private fields */ }

Implementations

This assumes that the device interface has already been created. Otherwise an error will be returned. You can create a new device interface with RouteSocket::add_device.

The peers in this device won’t be reachable at their allowed IPs until they’re added to the newly created device interface through a Netlink Route message. This library doesn’t have built-in way to do that right now. Here’s how it would be done with the ip command:

 sudo ip -4 route add 127.3.1.1/32 dev wgtest0

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.