|
|
|
@ -7,11 +7,11 @@ |
|
|
|
|
|
|
|
|
|
/// ABI compatible struct with upb_StringView.
|
|
|
|
|
///
|
|
|
|
|
/// Note that this has semantics similar to `core::string_view` in C++ and
|
|
|
|
|
/// Note that this has semantics similar to `std::string_view` in C++ and
|
|
|
|
|
/// `&[u8]` in Rust, but is not ABI-compatible with either.
|
|
|
|
|
///
|
|
|
|
|
/// If `len` is 0, then `ptr` is allowed to be either null or dangling. C++
|
|
|
|
|
/// considers a dangling 0-len `core::string_view` to be invalid, and Rust
|
|
|
|
|
/// considers a dangling 0-len `std::string_view` to be invalid, and Rust
|
|
|
|
|
/// considers a `&[u8]` with a null data pointer to be invalid.
|
|
|
|
|
#[repr(C)] |
|
|
|
|
#[derive(Copy, Clone)] |
|
|
|
|