Skip to content

Add a way to parse IP addresses without having to utf8-validate #94821

Closed
@jyn514

Description

@jyn514

The only standard way I've found to parse an IP address is IpAddr::from_str. That function immediately converts the string to bytes:

Parser { state: input.as_bytes() }

It would be great to expose some way (not necessarily Parser::new, but something similar) that doesn't require doing unnecessary utf8 validation.

@rustbot label: +T-libs +C-enhancement

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-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