Enum rustc_lexer::RawStrError [−][src]
pub enum RawStrError {
InvalidStarter {
bad_char: char,
},
NoTerminator {
expected: usize,
found: usize,
possible_terminator_offset: Option<usize>,
},
TooManyDelimiters {
found: usize,
},
}
Expand description
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
Non #
characters exist between r
and "
eg. r#~"..
Fields of InvalidStarter
bad_char: char
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.
More than 65535 #
s exist.
Fields of TooManyDelimiters
found: usize
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for RawStrError
impl Send for RawStrError
impl Sync for RawStrError
impl Unpin for RawStrError
impl UnwindSafe for RawStrError
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 40 bytes
Size for each variant:
InvalidStarter
: 4 bytesNoTerminator
: 36 bytesTooManyDelimiters
: 12 bytes