-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.
Description
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
- Implementation PR: Introduce unstable
Ipv{4,6}AddrPrefix
#86992To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Metadata
Metadata
Assignees
Labels
A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`Area: `std::io`, `std::fs`, `std::net` and `std::path`C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Ipv{4,6}AddrPrefix
#86992dtolnay commentedon Jun 25, 2024
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.