Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Tracking Issue for addr_parse_ascii feature #101035

Copy link
Copy link
Open
@marmeladema

Description

@marmeladema
Issue body actions

Feature gate: #![feature(addr_parse_ascii)]

This is a tracking issue for parsing network addresses (IP, Socket, etc) from a slice of bytes.

Internally the parser already works on bytes, this feature exposes publicly the ability to parse network address from a slice of bytes and therefor avoid the need to do utf8 validation in case one has only bytes.

Public API

impl IpAddr {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}
impl Ipv4Addr {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}
impl Ipv6Addr {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}
impl SocketAddrV4 {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}
impl SocketAddrV6 {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}
impl SocketAddr {
    pub fn parse_ascii(b: &[u8]) -> Result<Self, AddrParseError> {
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

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

tommyreins, niklasf, Dushistov, dullbananas, luke-goddard and 5 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    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

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.