pub trait Utf8StringLiteralE: Eoi {
// Required methods
fn raw_not_utf8() -> Self;
fn raw_too_many_ats() -> Self;
fn escaping_not_utf8() -> Self;
fn invalid_escape_sequence() -> Self;
fn unicode_escape_number_digits() -> Self;
fn unicode_escape_invalid_scalar() -> Self;
fn unicode_escape_no_closing() -> Self;
fn not_utf8_string_literal() -> Self;
}Expand description
A trait for error types that can represent errors occurring when parsing a UTF-8 string literal.
Required Methods§
Sourcefn raw_not_utf8() -> Self
fn raw_not_utf8() -> Self
Create a value indicating that a raw UTF-8 string literal contains non-utf8 bytes.
Sourcefn raw_too_many_ats() -> Self
fn raw_too_many_ats() -> Self
Create a value indicating that a raw UTF-8 string literal starts with more than 255 @.
Sourcefn escaping_not_utf8() -> Self
fn escaping_not_utf8() -> Self
Create a value indicating that an escaping UTF-8 string literal contains non-utf8 bytes.
Sourcefn invalid_escape_sequence() -> Self
fn invalid_escape_sequence() -> Self
Create a value indicating that an escaping UTF-8 string literal contains a \ followed by an invalid character.
Sourcefn unicode_escape_number_digits() -> Self
fn unicode_escape_number_digits() -> Self
Create a value indicating that a unicode escape sequence contains an invalid number of digits.
Sourcefn unicode_escape_invalid_scalar() -> Self
fn unicode_escape_invalid_scalar() -> Self
Create a value indicating that a unicode escape sequence encodes a number that is not a unicode scalar.
Sourcefn unicode_escape_no_closing() -> Self
fn unicode_escape_no_closing() -> Self
Create a value indicating that a unicode escape sequence is not terminated by a }.
Sourcefn not_utf8_string_literal() -> Self
fn not_utf8_string_literal() -> Self
Create a value indicating that the input does not contain (even the beginning of) a UTF-8 string literal.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.