about summary refs log tree commit diff
path: root/library/std/src/sys/unix/net.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-29 06:34:41 +0200
committerGitHub <noreply@github.com>2022-08-29 06:34:41 +0200
commit52016a10053bcdd6c52b60cdcab8c316d26f4172 (patch)
treee3013a0518523725850f71ffbdf102aa4cca244a /library/std/src/sys/unix/net.rs
parent1ea4efd0656599f824e2567a5b7a95454f701c03 (diff)
parent8bb4b5f44c8b7c811e2075022e5205f927287e0a (diff)
downloadrust-52016a10053bcdd6c52b60cdcab8c316d26f4172.tar.gz
rust-52016a10053bcdd6c52b60cdcab8c316d26f4172.zip
Rollup merge of #94890 - marmeladema:ip-addr-try-from-bytes, r=joshtriplett
Support parsing IP addresses from a byte string

Fixes #94821

The goal is to be able to parse addresses from a byte string without requiring to do any utf8 validation. Since internally the parser already works on byte strings, this should be possible and I personally already needed this in the past too.

~~I used the proposed approach from the issue by implementing `TryFrom<&'a [u8]>` for all 6 address types (3 ip address types and 3 socket address types). I believe implementing stable traits for stable types is insta-stable so this will probably need an FCP?~~

Switched to an unstable inherent method approach called `parse_ascii` as requested.

cc ``````@jyn514``````
Diffstat (limited to 'library/std/src/sys/unix/net.rs')
0 files changed, 0 insertions, 0 deletions