[Pitch] Extensible availability checking

I was just about to open a new topic about this. Hashable for String.UTF8View would be very welcome as well.

Details about String wrapper

My use case is a type that shares many of the properties of String (guaranteed valid Unicode, small string optimization, …), but adheres to UTF-8 unit equality instead of Unicode equality. This is needed for interfacing with external systems that do not use Unicode equality and just treat strings as a collection of bytes. Also, such a type would be very helpful in Embedded Swift.

Currently, I can define a wrapper struct around String, but nothing offered by the pubic API (a.utf8.elementsEqual(b.utf8) or withUTF8) are as fast as the native String equality and hashing implementations.

Current effort: Performant byte-based String wrapper

The above is still not as fast as String equality/hashing and not sound for strings with \r\n and stores an additional byte alongside each string.

With String.UTF8View: Hashable, I could implement such a wrapper type without additional storage requirements and minimal performance penalties.