pub enum ContentValidationError {
InvalidText,
InvalidMimeType,
InvalidImageData,
InvalidImageReference,
InvalidToolName,
InvalidProviderToolCallId,
ToolArgumentsMustBeObject,
ToolArgumentsOutOfBounds(ProtocolMetadataError),
InvalidExternalContent(ExternalContentError),
}Expand description
Error returned when validating content blocks.
Variants§
InvalidText
Text is empty, too large, or contains a null character.
InvalidMimeType
The MIME type is not a supported canonical image type.
InvalidImageData
Inline image data is empty, too large, or not valid standard Base64.
InvalidImageReference
An image reference is empty, too large, or contains controls.
InvalidToolName
The tool name is not canonical.
InvalidProviderToolCallId
The provider tool-call identifier is empty, oversized, or contains controls.
ToolArgumentsMustBeObject
Tool arguments must be a JSON object.
ToolArgumentsOutOfBounds(ProtocolMetadataError)
Tool arguments exceed JSON byte or nesting limits.
InvalidExternalContent(ExternalContentError)
Hosted activity, source, citation, or continuation content is invalid.
Trait Implementations§
Source§impl Debug for ContentValidationError
impl Debug for ContentValidationError
Source§impl Display for ContentValidationError
impl Display for ContentValidationError
Source§impl Error for ContentValidationError
impl Error for ContentValidationError
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 EventValidationError
impl From<ContentValidationError> for EventValidationError
Source§fn from(source: ContentValidationError) -> Self
fn from(source: ContentValidationError) -> Self
Converts to this type from the input type.
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.
Source§impl From<ContentValidationError> for RecordValidationError
impl From<ContentValidationError> for RecordValidationError
Source§fn from(source: ContentValidationError) -> Self
fn from(source: ContentValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ExternalContentError> for ContentValidationError
impl From<ExternalContentError> for ContentValidationError
Source§fn from(source: ExternalContentError) -> Self
fn from(source: ExternalContentError) -> Self
Converts to this type from the input type.
Source§impl From<ProtocolMetadataError> for ContentValidationError
impl From<ProtocolMetadataError> for ContentValidationError
Source§fn from(source: ProtocolMetadataError) -> Self
fn from(source: ProtocolMetadataError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ContentValidationError
impl !UnwindSafe for ContentValidationError
impl Freeze for ContentValidationError
impl Send for ContentValidationError
impl Sync for ContentValidationError
impl Unpin for ContentValidationError
impl UnsafeUnpin for ContentValidationError
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