pub enum ParseError {
UnexpectedChar {
ch: char,
pos: usize,
},
UnexpectedEof,
InvalidValue {
value: String,
},
SchemaMismatch {
expected: usize,
got: usize,
},
Utf8Error {
offset: usize,
},
InputTooLarge {
size: usize,
max: usize,
},
UnclosedBracket {
pos: usize,
},
UnclosedParen {
pos: usize,
},
MissingValue {
pos: usize,
},
InvalidTable {
msg: String,
},
}Expand description
Parse errors for Dx Serializer format
Variants§
UnexpectedChar
Parser encountered a character that is not valid at the current offset.
Fields
UnexpectedEof
Parser reached the end of input before a complete value or structure was read.
InvalidValue
Parser found a scalar or compound value that does not match the LLM format.
SchemaMismatch
A table row did not match the declared schema width.
Fields
Utf8Error
Input bytes were not valid UTF-8.
InputTooLarge
Input exceeded the configured serializer safety limit.
UnclosedBracket
Array or schema bracket was opened without a matching close bracket.
UnclosedParen
Object or table parenthesis was opened without a matching close parenthesis.
MissingValue
A key-value assignment was missing the right-hand value.
InvalidTable
Table syntax could not be parsed into schema and rows.
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ParseError> for DxError
impl From<ParseError> for DxError
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Convert a ParseError from the LLM parser into a DxError.
This conversion preserves position information where available, mapping each ParseError variant to the most appropriate DxError variant.
Source§impl From<ParseError> for ConvertError
impl From<ParseError> for ConvertError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.