| 639 | } |
| 640 | |
| 641 | absl::string_view ByteString::AsStringView() const { |
| 642 | const ByteStringKind kind = GetKind(); |
| 643 | ABSL_CHECK(kind == ByteStringKind::kSmall || // Crash OK |
| 644 | kind == ByteStringKind::kMedium); |
| 645 | switch (kind) { |
| 646 | case ByteStringKind::kSmall: |
| 647 | return GetSmall(); |
| 648 | case ByteStringKind::kMedium: |
| 649 | return GetMedium(); |
| 650 | case ByteStringKind::kLarge: |
| 651 | ABSL_UNREACHABLE(); |
| 652 | } |
| 653 | } |
| 654 | |
| 655 | google::protobuf::Arena* absl_nullable ByteString::GetMediumArena( |
| 656 | const MediumByteStringRep& rep) { |