utf8_builder/
error.rs

1#[cfg(feature = "std")]
2use std::fmt::{self, Display, Formatter};
3
4#[cfg(feature = "std")]
5use std::error::Error;
6
7#[derive(Debug)]
8pub struct Utf8Error;
9
10#[cfg(feature = "std")]
11impl Display for Utf8Error {
12    #[inline]
13    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
14        f.write_str("incorrect UTF-8 data")
15    }
16}
17
18#[cfg(feature = "std")]
19impl Error for Utf8Error {}