pub enum InputValidationError {
Show 20 variants
EmptyMessages,
TooManyMessages {
count: usize,
max: usize,
},
AggregateTextTooLarge {
bytes: usize,
max: usize,
},
EmptyTextParts,
EmptyTextPart,
TextPartTooLarge {
bytes: usize,
max: usize,
},
TooManyContentParts {
count: usize,
max: usize,
},
EmptyAssistant {
index: usize,
},
TooManyToolCalls {
count: usize,
max: usize,
},
DuplicateToolCallId {
id: String,
},
UnknownToolCallId {
id: String,
},
EmptyToolCallId,
ToolCallIdTooLong {
bytes: usize,
max: usize,
},
EmptyName,
NameTooLong {
bytes: usize,
max: usize,
},
ControlCharacter,
JsonTooDeep {
depth: u32,
max: u32,
},
ToolArgumentsTooLarge {
bytes: usize,
max: usize,
},
JsonEncodeFailed,
Identity(IdentityError),
}Expand description
Canonical input validation failure.
Variants§
EmptyMessages
No messages.
TooManyMessages
Too many messages.
AggregateTextTooLarge
Aggregate text too large.
EmptyTextParts
System/User/Tool without text parts.
EmptyTextPart
Empty text part.
TextPartTooLarge
Text part too large.
TooManyContentParts
Too many content parts.
EmptyAssistant
Assistant with neither text nor tool calls.
TooManyToolCalls
Too many tool calls.
DuplicateToolCallId
Duplicate tool_call_id in input.
UnknownToolCallId
Tool message references unknown id.
EmptyToolCallId
Empty tool_call_id.
ToolCallIdTooLong
tool_call_id too long.
EmptyName
Empty name.
NameTooLong
Name too long.
ControlCharacter
Control character in a string field.
JsonTooDeep
JSON nesting too deep.
ToolArgumentsTooLarge
Tool arguments JSON too large.
JsonEncodeFailed
JSON encode failed (unexpected).
Identity(IdentityError)
Identity construction failed (tool name).
Trait Implementations§
Source§impl Clone for InputValidationError
impl Clone for InputValidationError
Source§fn clone(&self) -> InputValidationError
fn clone(&self) -> InputValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 InputValidationError
impl Debug for InputValidationError
Source§impl Display for InputValidationError
impl Display for InputValidationError
impl Eq for InputValidationError
Source§impl Error for InputValidationError
impl Error for InputValidationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<IdentityError> for InputValidationError
impl From<IdentityError> for InputValidationError
Source§fn from(source: IdentityError) -> Self
fn from(source: IdentityError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InputValidationError
impl PartialEq for InputValidationError
impl StructuralPartialEq for InputValidationError
Auto Trait Implementations§
impl Freeze for InputValidationError
impl RefUnwindSafe for InputValidationError
impl Send for InputValidationError
impl Sync for InputValidationError
impl Unpin for InputValidationError
impl UnsafeUnpin for InputValidationError
impl UnwindSafe for InputValidationError
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