[][src]Enum rustc_ap_rustc_lexer::RawStrError

pub enum RawStrError {
    InvalidStarter {
        bad_char: char,
    },
    NoTerminator {
        expected: usize,
        found: usize,
        possible_terminator_offset: Option<usize>,
    },
    TooManyDelimiters {
        found: usize,
    },
}

Error produced validating a raw string. Represents cases like:

  • r##~"abcde"##: InvalidStarter
  • r###"abcde"##: NoTerminator { expected: 3, found: 2, possible_terminator_offset: Some(11)
  • Too many #s (>65535): TooManyDelimiters

Variants

InvalidStarter

Non # characters exist between r and " eg. r#~"..

Fields of InvalidStarter

bad_char: char
NoTerminator

The string was never terminated. possible_terminator_offset is the number of characters after r or br where they may have intended to terminate it.

Fields of NoTerminator

expected: usizefound: usizepossible_terminator_offset: Option<usize>
TooManyDelimiters

More than 65535 #s exist.

Fields of TooManyDelimiters

found: usize

Trait Implementations

impl Clone for RawStrError[src]

impl Copy for RawStrError[src]

impl Debug for RawStrError[src]

impl Eq for RawStrError[src]

impl Ord for RawStrError[src]

impl PartialEq<RawStrError> for RawStrError[src]

impl PartialOrd<RawStrError> for RawStrError[src]

impl StructuralEq for RawStrError[src]

impl StructuralPartialEq for RawStrError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.