Skip to content

Tracking Issue for {IpAddr, SocketAddr}::unspecified_from() #158975

Description

@kennytm

Feature gate: #![feature(addr_unspecified_from)]

This is a tracking issue for the IpAddr::unspecified_from() and SocketAddr::unspecified_from() functions for creating a 0.0.0.0:0/[::]:0 address matching the IP version of the input.

Public API

// core::net

impl IpAddr {
    pub fn unspecified_from(this: Self) -> Self;
}

impl SocketAddr {
    pub fn unspecified_from(this: Self) -> Self;
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • Spelling of function (unspecified_from vs to_unspecified vs something else), and whether we allow the function to take (&self) instead of (this: Self).
  • How should the flowinfo and scope_id fields of SocketAddrV6 be handled - inherited or zeroed?

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library 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

    Issue actions