pub enum EscapeError {
Show 14 variants
LoneSlash,
InvalidEscape,
BareCarriageReturn,
CannotSkipMultipleLines,
HexEscapeTooShort,
InvalidHexEscape,
UnicodeEscapeTooShort,
InvalidUnicodeEscape,
StrNewline,
StrNonAsciiChar,
HexNotHexDigit,
HexBadUnderscore,
HexOddDigits,
HexPrefix,
}Expand description
Errors and warnings that can occur during string unescaping.
Variants§
LoneSlash
Escaped ’' character without continuation.
InvalidEscape
Invalid escape character (e.g. ‘\z’).
BareCarriageReturn
Raw ‘\r’ encountered.
CannotSkipMultipleLines
Can only skip one line of whitespace.
"this is \
ok" == "this is ok";
"this is \
\
also ok" == "this is also ok";
"this is \
not ok"; // error: cannot skip multiple linesHexEscapeTooShort
Numeric character escape is too short (e.g. ‘\x1’).
InvalidHexEscape
Invalid character in numeric escape (e.g. ‘\xz1’).
UnicodeEscapeTooShort
Unicode character escape is too short (e.g. ‘\u1’).
InvalidUnicodeEscape
Invalid character in unicode character escape (e.g. ‘\uz111’).
StrNewline
Newline in string literal. These must be escaped.
StrNonAsciiChar
Non-ASCII character in non-unicode literal.
HexNotHexDigit
Non hex-digit character in hex literal.
HexBadUnderscore
Underscore in hex literal.
HexOddDigits
Odd number of hex digits in hex literal.
HexPrefix
Hex literal with the 0x prefix.
Trait Implementations§
Source§impl Debug for EscapeError
impl Debug for EscapeError
Source§impl PartialEq for EscapeError
impl PartialEq for EscapeError
impl Eq for EscapeError
impl StructuralPartialEq for EscapeError
Auto Trait Implementations§
impl Freeze for EscapeError
impl RefUnwindSafe for EscapeError
impl Send for EscapeError
impl Sync for EscapeError
impl Unpin for EscapeError
impl UnwindSafe for EscapeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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: 1 byte
Size for each variant:
LoneSlash: 0 bytesInvalidEscape: 0 bytesBareCarriageReturn: 0 bytesCannotSkipMultipleLines: 0 bytesHexEscapeTooShort: 0 bytesInvalidHexEscape: 0 bytesUnicodeEscapeTooShort: 0 bytesInvalidUnicodeEscape: 0 bytesStrNewline: 0 bytesStrNonAsciiChar: 0 bytesHexNotHexDigit: 0 bytesHexBadUnderscore: 0 bytesHexOddDigits: 0 bytesHexPrefix: 0 bytes