Skip to main content

IpAddrExt

Trait IpAddrExt 

Source
pub trait IpAddrExt: Sized {
    // Required method
    fn as_localhost(&self) -> Self;
}
Expand description

Extension trait for IP addresses.

Required Methods§

Source

fn as_localhost(&self) -> Self

Returns the localhost address of the same family as other.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IpAddrExt for IpAddr

Source§

fn as_localhost(&self) -> Self

Implementors§