pub struct InterfaceInfo {
pub network_name: String,
pub address: IpNet,
pub private_key: String,
pub listen_port: Option<u16>,
}Fields§
§network_name: StringThe interface name (i.e. “tonari”)
address: IpNetThe invited peer’s internal IP address that’s been allocated to it, inside the entire network’s CIDR prefix.
private_key: StringWireGuard private key (base64)
listen_port: Option<u16>The local listen port. A random port will be used if None.
Implementations§
Source§impl InterfaceInfo
impl InterfaceInfo
pub fn public_key(&self) -> Result<String, Error>
Trait Implementations§
Source§impl Clone for InterfaceInfo
impl Clone for InterfaceInfo
Source§fn clone(&self) -> InterfaceInfo
fn clone(&self) -> InterfaceInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InterfaceInfo
impl Debug for InterfaceInfo
Source§impl<'de> Deserialize<'de> for InterfaceInfo
impl<'de> Deserialize<'de> for InterfaceInfo
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
Auto Trait Implementations§
impl Freeze for InterfaceInfo
impl RefUnwindSafe for InterfaceInfo
impl Send for InterfaceInfo
impl Sync for InterfaceInfo
impl Unpin for InterfaceInfo
impl UnwindSafe for InterfaceInfo
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