(&self)
| 261 | // TODO: rename to to_str |
| 262 | #[inline] |
| 263 | pub fn as_str(&self) -> Option<&str> { |
| 264 | self.kind |
| 265 | .is_utf8() |
| 266 | .then(|| unsafe { core::str::from_utf8_unchecked(self.data.as_bytes()) }) |
| 267 | } |
| 268 | |
| 269 | pub fn as_ascii(&self) -> Option<&AsciiStr> { |
| 270 | self.kind |