utf8_builder/error.rs
1use core::{
2 error::Error,
3 fmt::{self, Display, Formatter},
4};
5
6#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7pub struct Utf8Error;
8
9impl Display for Utf8Error {
10 #[inline]
11 fn fmt(&self, f: &mut Formatter) -> fmt::Result {
12 f.write_str("incorrect UTF-8 data")
13 }
14}
15
16impl Error for Utf8Error {}