pub(crate) struct ErrorReportingHandler;Expand description
The Output = Result<char, Utf8CharsError> case.
Implementations§
Trait Implementations§
Source§impl Clone for ErrorReportingHandler
impl Clone for ErrorReportingHandler
Source§fn clone(&self) -> ErrorReportingHandler
fn clone(&self) -> ErrorReportingHandler
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorReportingHandler
impl Debug for ErrorReportingHandler
Source§impl Utf8Handler for ErrorReportingHandler
impl Utf8Handler for ErrorReportingHandler
Source§fn single_byte(&self, ascii: Ascii) -> Self::Output
fn single_byte(&self, ascii: Ascii) -> Self::Output
Map a single-byte UTF-8 sequence to Output.
When Output is char, ascii.to_char()
is the appropriate implementation.
The implementation is expected to be marked
#[inline(always)].
Source§fn two_byte(&self, sequence: TwoByteSequence) -> Self::Output
fn two_byte(&self, sequence: TwoByteSequence) -> Self::Output
Map a two-byte UTF-8 sequence to Output.
When Output is char, sequence.to_char()
is the appropriate implementation.
The implementation is expected to be marked
#[inline(always)].
Source§fn three_byte(&self, sequence: ThreeByteSequence) -> Self::Output
fn three_byte(&self, sequence: ThreeByteSequence) -> Self::Output
Map a three-byte UTF-8 sequence to Output.
When Output is char, sequence.to_char()
is the appropriate implementation.
The implementation is expected to be marked
#[inline(always)].
Source§fn four_byte(&self, sequence: FourByteSequence) -> Self::Output
fn four_byte(&self, sequence: FourByteSequence) -> Self::Output
Map a four-byte UTF-8 sequence to Output.
When Output is char, sequence.to_char()
is the appropriate implementation.
The implementation is expected to be marked
#[inline(always)].
Source§fn error(&self) -> Self::Output
fn error(&self) -> Self::Output
Map a single UTF-8 error to Output.
What constitutes a single error is defined by the WHATWG Encoding Standard.
When Output is char,
char::REPLACEMENT_CHARACTER
is the appropriate implementation.
The implementation of this method is expected to
be declared #[inline(always)].