Skip to content

Tracking Issue for IP address prefixes #86991

@CDirkx

Description

@CDirkx
Contributor

This is the tracking issue for IP address prefixes such as 192.0.2.0/24.
The feature gate for the issue is #![feature(ip_prefix)].

Overview

Ipv4AddrPrefix

#[derive(Copy, PartialEq, Eq, Clone, Hash)]
pub struct Ipv4AddrPrefix {
    address: Ipv4Addr,
    len: u8,
}

impl Ipv4AddrPrefix {
    pub const fn new(address: Ipv4AddrPrefix, len: u32) -> Result<Ipv4AddrPrefix, InvalidPrefixError>;
    pub const fn address(&self) -> Ipv4Addr;
    pub const fn len(&self) -> u32;
    pub const fn contains(&self, address: &Ipv4Addr) -> bool;
}

impl Debug for Ipv4AddrPrefix  {}
impl Display for Ipv4AddrPrefix  {}
impl From<Ipv4Addr> for Ipv4AddrPrefix  {}
impl FromStr for Ipv4AddrPrefix  {}

Ipv6AddrPrefix

#[derive(Copy, PartialEq, Eq, Clone, Hash)]
pub struct Ipv6AddrPrefix {
    address: Ipv6Addr,
    len: u8,
}

impl Ipv6AddrPrefix {
    pub const fn new(address: Ipv6AddrPrefix, len: u32) -> Result<Ipv6AddrPrefix, InvalidPrefixError>;
    pub const fn address(&self) -> Ipv6Addr;
    pub const fn len(&self) -> u32;
    pub const fn contains(&self, address: &Ipv6Addr) -> bool;
}

impl Debug for Ipv6AddrPrefix  {}
impl Display for Ipv6AddrPrefix  {}
impl From<Ipv6Addr> for Ipv6AddrPrefix  {}
impl FromStr for Ipv6AddrPrefix  {}

Unresolved Questions

Implementation history

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jul 9, 2021
added
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on Jul 9, 2021
dtolnay

dtolnay commented on Jun 25, 2024

@dtolnay
Member

The feature tracked by this issue never got merged. I'll close the tracking issue since this is not tracking any work at the moment, but we can reopen (or create a new one) if someone picks this back up in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dtolnay@CDirkx@rustbot

        Issue actions

          Tracking Issue for IP address prefixes · Issue #86991 · rust-lang/rust