pub trait ErrorHandler {
type Error;
type StrBuf: StrBuffer;
type BytesBuf: AsRef<[u8]>;
fn handle_encode_error(
&self,
data: &str,
char_range: Range<usize>,
reason: &str
) -> EncodeErrorResult<Self::StrBuf, Self::BytesBuf, Self::Error>;
fn handle_decode_error(
&self,
data: &[u8],
byte_range: Range<usize>,
reason: &str
) -> DecodeErrorResult<Self::StrBuf, Self::BytesBuf, Self::Error>;
fn error_oob_restart(&self, i: usize) -> Self::Error;
fn error_encoding(
&self,
data: &str,
char_range: Range<usize>,
reason: &str
) -> Self::Error;
}