Tracking Issue for addr_parse_ascii feature · Issue #101035 · rust-lang/rust
Navigation Menu
- [GitHub Copilot
Write better code with AI](https://github.com/features/copilot)
- [GitHub Copilot
[GitHub Advanced Security
Find and fix vulnerabilities](https://github.com/security/advanced-security)[Actions
Automate any workflow](https://github.com/features/actions)[Codespaces
Instant dev environments](https://github.com/features/codespaces)[Issues
Plan and track work](https://github.com/features/issues)[Code Review
Manage code changes](https://github.com/features/code-review)[Discussions
Collaborate outside of code](https://github.com/features/discussions)[Code Search
Find more, search less](https://github.com/features/code-search)Explore
- [GitHub Sponsors
Fund open source developers](https://github.com/sponsors)
- [GitHub Sponsors
[The ReadME Project
GitHub community articles](https://github.com/readme)- [Enterprise platform
AI-powered developer platform](https://github.com/enterprise)
- [Enterprise platform
Use saved searches to filter your results more quickly
Description
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
- Implementation: Support parsing IP addresses from a byte string #94890
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- None yet.