Files
rust/library/core/src
Matthias Krüger 08d5b2303a Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi
Implement `ByteStr` and `ByteString` types

Approved ACP: https://github.com/rust-lang/libs-team/issues/502
Tracking issue: https://github.com/rust-lang/rust/issues/134915

These types represent human-readable strings that are conventionally,
but not always, UTF-8. The `Debug` impl prints non-UTF-8 bytes using
escape sequences, and the `Display` impl uses the Unicode replacement
character.

This is a minimal implementation of these types and associated trait
impls. It does not add any helper methods to other types such as `[u8]`
or `Vec<u8>`.

I've omitted a few implementations of `AsRef`, `AsMut`, and `Borrow`,
when those would be the second implementation for a type (counting the
`T` impl), to avoid potential inference failures. We can attempt to add
more impls later in standalone commits, and run them through crater.

In addition to the `bstr` feature, I've added a `bstr_internals` feature
for APIs provided by `core` for use by `alloc` but not currently
intended for stabilization.

This API and its implementation are based *heavily* on the `bstr` crate
by Andrew Gallant (`@BurntSushi).`

r? `@BurntSushi`
2025-01-23 19:54:23 +01:00
..
2025-01-20 18:35:32 +01:00
2024-10-09 19:34:27 -04:00
2024-12-21 01:26:47 +00:00
2025-01-20 18:35:32 +01:00
2025-01-08 21:26:39 +01:00
fmt
2025-01-08 22:11:33 +01:00
2025-01-20 18:35:32 +01:00
2024-11-27 12:10:21 +00:00
2025-01-08 20:02:18 +01:00
2025-01-20 18:35:32 +01:00
2024-12-24 23:37:30 +08:00
2024-12-21 01:26:47 +00:00
2025-01-08 20:02:18 +01:00
2025-01-22 09:19:24 +02:00
2025-01-22 17:53:39 +02:00
2024-09-05 17:24:01 +01:00
2025-01-20 18:35:32 +01:00
2024-12-21 01:26:47 +00:00
2024-11-27 15:14:54 +00:00
2024-11-27 15:14:54 +00:00
2024-12-21 01:26:47 +00:00
2024-09-05 17:24:01 +01:00
2024-11-27 15:14:54 +00:00