pub enum Layer3Addr {
V4([u8; 4]),
V6([u16; 8]),
}Expand description
representation of an IpAddr that can be saved to a file, the purpose of this being the ability to connect to stable global peers even after the cnnection has been closed for a time
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for Layer3Addr
impl Clone for Layer3Addr
Source§fn clone(&self) -> Layer3Addr
fn clone(&self) -> Layer3Addr
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 Layer3Addr
impl Debug for Layer3Addr
Source§impl<'de> Deserialize<'de> for Layer3Addr
impl<'de> Deserialize<'de> for Layer3Addr
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
Source§impl Display for Layer3Addr
impl Display for Layer3Addr
Source§impl From<&IpAddr> for Layer3Addr
impl From<&IpAddr> for Layer3Addr
Source§impl From<&Layer3Addr> for IpAddr
impl From<&Layer3Addr> for IpAddr
Source§fn from(addr: &Layer3Addr) -> Self
fn from(addr: &Layer3Addr) -> Self
Converts to this type from the input type.
Source§impl From<&SocketAddr> for Layer3Addr
impl From<&SocketAddr> for Layer3Addr
Source§fn from(ipaddr: &SocketAddr) -> Layer3Addr
fn from(ipaddr: &SocketAddr) -> Layer3Addr
Converts to this type from the input type.
Source§impl From<IpAddr> for Layer3Addr
impl From<IpAddr> for Layer3Addr
Source§impl From<Layer3Addr> for IpAddr
impl From<Layer3Addr> for IpAddr
Source§fn from(addr: Layer3Addr) -> Self
fn from(addr: Layer3Addr) -> Self
Converts to this type from the input type.
Source§impl Hash for Layer3Addr
impl Hash for Layer3Addr
Source§impl Ord for Layer3Addr
impl Ord for Layer3Addr
Source§fn cmp(&self, other: &Layer3Addr) -> Ordering
fn cmp(&self, other: &Layer3Addr) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq<IpAddr> for Layer3Addr
impl PartialEq<IpAddr> for Layer3Addr
Source§impl PartialEq<Layer3Addr> for IpAddr
impl PartialEq<Layer3Addr> for IpAddr
Source§impl PartialEq for Layer3Addr
impl PartialEq for Layer3Addr
Source§impl PartialOrd for Layer3Addr
impl PartialOrd for Layer3Addr
Source§impl Serialize for Layer3Addr
impl Serialize for Layer3Addr
impl Copy for Layer3Addr
impl Eq for Layer3Addr
impl StructuralPartialEq for Layer3Addr
Auto Trait Implementations§
impl Freeze for Layer3Addr
impl RefUnwindSafe for Layer3Addr
impl Send for Layer3Addr
impl Sync for Layer3Addr
impl Unpin for Layer3Addr
impl UnwindSafe for Layer3Addr
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