Trait IntoIpRange

Source
pub trait IntoIpRange {
    // Required method
    fn into_range(self) -> Option<RangeInclusive<IpAddr>>;

    // Provided method
    fn validate(
        ip_range: RangeInclusive<IpAddr>,
    ) -> Option<RangeInclusive<IpAddr>> { ... }
}
Expand description

Converts a type into an IP range.

Required Methods§

Source

fn into_range(self) -> Option<RangeInclusive<IpAddr>>

Converts the type into an IP range.

Provided Methods§

Source

fn validate(ip_range: RangeInclusive<IpAddr>) -> Option<RangeInclusive<IpAddr>>

Validates the IP range.

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 IntoIpRange for (IpAddr, IpAddr)

Source§

impl IntoIpRange for RangeInclusive<IpAddr>

Implementors§