Utf8StringLiteralE

Trait Utf8StringLiteralE 

Source
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§

Source

fn raw_not_utf8() -> Self

Create a value indicating that a raw UTF-8 string literal contains non-utf8 bytes.

Source

fn raw_too_many_ats() -> Self

Create a value indicating that a raw UTF-8 string literal starts with more than 255 @.

Source

fn escaping_not_utf8() -> Self

Create a value indicating that an escaping UTF-8 string literal contains non-utf8 bytes.

Source

fn invalid_escape_sequence() -> Self

Create a value indicating that an escaping UTF-8 string literal contains a \ followed by an invalid character.

Source

fn unicode_escape_number_digits() -> Self

Create a value indicating that a unicode escape sequence contains an invalid number of digits.

Source

fn unicode_escape_invalid_scalar() -> Self

Create a value indicating that a unicode escape sequence encodes a number that is not a unicode scalar.

Source

fn unicode_escape_no_closing() -> Self

Create a value indicating that a unicode escape sequence is not terminated by a }.

Source

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.

Implementors§