Skip to content

request: Make unix::net::SocketAddr create methods public #65275

Closed
@kleimkuhler

Description

@kleimkuhler

Motivation

Recently tokio-rs/mio needed support for creating the
std::os::unix::net::SocketAddr type. While the type is currently public, it is
not possible to create one as both creation methods are private:

The workaround was creating a mio specific SocketAddr that is equivalent to
this type.

A use of needing SocketAddr::from_parts is shown here.

#65255 was a quick fix at trying to add this, but it will need #[unstable] attribute and therefore be tied to an issue I believe. I wanted to open some brief conversation on if this would be okay and I can add the things missing in that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-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

    Issue actions