#[non_exhaustive]pub enum TextParseErrorKind {
UnexpectedEof,
UnexpectedByte {
expected: u8,
found: Option<u8>,
},
TrailingInput,
InvalidUtf8(InvalidUtf8),
InvalidDigit,
InvalidEscape,
BufferTooSmall,
Overflow,
UnterminatedQuote,
UnexpectedAfterQuote,
}Expand description
๐ ::= ๐ฉ The category of a text parsing failure.
๐ text/parse::TextParseErrorKind
๐ฆ size_of::<TextParseErrorKind>() == 12 bytes / 96 bits #๏ธโฃ #[cfg(target_pointer_width = โ32โ)]
โ๏ธOption<T> ๐ฐ T
๐ฆ size_of::<TextParseErrorKind>() == 24 bytes / 192 bits #๏ธโฃ #[cfg(target_pointer_width = โ64โ)]
โ๏ธOption<T> ๐ฐ T
Variants (Non-exhaustive)ยง
This enum is marked as non-exhaustive
UnexpectedEof
Reached end of input unexpectedly.
UnexpectedByte
Expected a specific byte but found a different byte, or EOF.
Fields
TrailingInput
Input remains after a complete value was parsed.
InvalidUtf8(InvalidUtf8)
Decoded bytes were not valid UTF-8.
InvalidDigit
Expected an ASCII digit but found another byte.
InvalidEscape
Found an unsupported or malformed escape sequence.
BufferTooSmall
The destination buffer could not hold the parsed output.
Overflow
The parsed value overflowed the target representation.
UnterminatedQuote
A quoted segment reached EOF before its closing quote.
UnexpectedAfterQuote
Found unexpected trailing data after a closing quote.
Trait Implementationsยง
Sourceยงimpl Clone for TextParseErrorKind
impl Clone for TextParseErrorKind
Sourceยงfn clone(&self) -> TextParseErrorKind
fn clone(&self) -> TextParseErrorKind
1.0.0 (const: unstable) ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSourceยงimpl ConstInit for TextParseErrorKind
impl ConstInit for TextParseErrorKind
impl Copy for TextParseErrorKind
Sourceยงimpl Debug for TextParseErrorKind
impl Debug for TextParseErrorKind
Sourceยงimpl Display for TextParseErrorKind
impl Display for TextParseErrorKind
impl Eq for TextParseErrorKind
Sourceยงimpl Hash for TextParseErrorKind
impl Hash for TextParseErrorKind
Sourceยงimpl PartialEq for TextParseErrorKind
impl PartialEq for TextParseErrorKind
impl StructuralPartialEq for TextParseErrorKind
Auto Trait Implementationsยง
impl Freeze for TextParseErrorKind
impl RefUnwindSafe for TextParseErrorKind
impl Send for TextParseErrorKind
impl Sync for TextParseErrorKind
impl Unpin for TextParseErrorKind
impl UnsafeUnpin for TextParseErrorKind
impl UnwindSafe for TextParseErrorKind
Blanket Implementationsยง
Sourceยงimpl<T> AnyExt for T
impl<T> AnyExt for T
Sourceยงfn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
fn type_hash_with<H: Hasher>(&self, hasher: H) -> u64
TypeId of Self using a custom hasher.Sourceยงfn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Sourceยงfn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
fn as_any_box(self: Box<Self>) -> Box<dyn Any>where
Self: Sized,
alloc only.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> ByteSized for T
impl<T> ByteSized for T
Sourceยงconst BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Sourceยงfn byte_align(&self) -> usize
fn byte_align(&self) -> usize
Sourceยงfn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> MemExt for Twhere
T: ?Sized,
impl<T> MemExt for Twhere
T: ?Sized,
Sourceยงconst NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Sourceยงfn mem_align_of<T>() -> usize
fn mem_align_of<T>() -> usize
Sourceยงfn mem_align_of_val(&self) -> usize
fn mem_align_of_val(&self) -> usize
Sourceยงfn mem_size_of<T>() -> usize
fn mem_size_of<T>() -> usize
Sourceยงfn mem_size_of_val(&self) -> usize
fn mem_size_of_val(&self) -> usize
Sourceยงfn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true if dropping values of this type matters. Read moreSourceยงfn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self without running its destructor. Read moreSourceยงfn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Sourceยงunsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงunsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout only.T represented by the all-zero byte-pattern. Read moreSourceยงfn mem_as_bytes(&self) -> &[u8] โ
fn mem_as_bytes(&self) -> &[u8] โ
unsafe_slice only.