pub struct NormalizationError {
pub kind: NormalizationErrorKind,
pub raw: String,
}Expand description
A non-fatal normalization issue surfaced from a parser.
kind carries the structured failure details; raw is a short snippet
of the offending input suitable for log output.
Fields§
§kind: NormalizationErrorKindStructured detail about what went wrong.
raw: StringA short, human-readable excerpt of the offending input. Parsers should keep this small (≲ 256 bytes) so it is safe to attach to a stream event.
Implementations§
Source§impl NormalizationError
impl NormalizationError
Sourcepub fn malformed_tool_call(body: impl Into<String>) -> Self
pub fn malformed_tool_call(body: impl Into<String>) -> Self
Construct a MalformedToolCallJson error with the body as raw.
Sourcepub fn unclosed_tool_call(partial: impl Into<String>) -> Self
pub fn unclosed_tool_call(partial: impl Into<String>) -> Self
Construct an UnclosedToolCallTag error from a partial body.
Trait Implementations§
Source§impl Clone for NormalizationError
impl Clone for NormalizationError
Source§fn clone(&self) -> NormalizationError
fn clone(&self) -> NormalizationError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NormalizationError
impl Debug for NormalizationError
Source§impl PartialEq for NormalizationError
impl PartialEq for NormalizationError
impl Eq for NormalizationError
impl StructuralPartialEq for NormalizationError
Auto Trait Implementations§
impl Freeze for NormalizationError
impl RefUnwindSafe for NormalizationError
impl Send for NormalizationError
impl Sync for NormalizationError
impl Unpin for NormalizationError
impl UnwindSafe for NormalizationError
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
Mutably borrows from an owned value. Read more