pub enum MessageValidationError {
InvalidContent,
InvalidContentValue(ContentValidationError),
InvalidToolFailure,
InconsistentToolFailure,
}Expand description
Error returned when validating canonical messages.
Variants§
InvalidContent
The content array is empty or contains a block invalid for the role.
InvalidContentValue(ContentValidationError)
Content or tool-name validation failed.
InvalidToolFailure
Tool failure code or message is invalid.
InconsistentToolFailure
Tool-result error flag does not match failure presence.
Trait Implementations§
Source§impl Debug for MessageValidationError
impl Debug for MessageValidationError
Source§impl Display for MessageValidationError
impl Display for MessageValidationError
Source§impl Error for MessageValidationError
impl Error for MessageValidationError
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<ContentValidationError> for MessageValidationError
impl From<ContentValidationError> for MessageValidationError
Source§fn from(source: ContentValidationError) -> Self
fn from(source: ContentValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MessageValidationError
impl !UnwindSafe for MessageValidationError
impl Freeze for MessageValidationError
impl Send for MessageValidationError
impl Sync for MessageValidationError
impl Unpin for MessageValidationError
impl UnsafeUnpin for MessageValidationError
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