pub enum ApiErrorMediaReason {
Unprocessable,
UnsupportedByModel,
MediaBudget,
Unknown(String),
}Expand description
Why the API refused an image or document
(ApiErrorParams::media_reason).
Variants§
Unprocessable
Every other refusal, a gateway’s report of a model’s refusal among them.
UnsupportedByModel
The API said that the model does not accept PDF documents.
MediaBudget
The request’s images and documents together exceed the API’s limit, and the requests that follow may leave out blocks of either kind.
Unknown(String)
A reason not yet known to this version of the crate.
Implementations§
Trait Implementations§
Source§impl Clone for ApiErrorMediaReason
impl Clone for ApiErrorMediaReason
Source§impl Debug for ApiErrorMediaReason
impl Debug for ApiErrorMediaReason
Source§impl<'de> Deserialize<'de> for ApiErrorMediaReason
impl<'de> Deserialize<'de> for ApiErrorMediaReason
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ApiErrorMediaReason
impl Display for ApiErrorMediaReason
impl Eq for ApiErrorMediaReason
Source§impl From<&str> for ApiErrorMediaReason
impl From<&str> for ApiErrorMediaReason
Source§impl Hash for ApiErrorMediaReason
impl Hash for ApiErrorMediaReason
Source§impl PartialEq for ApiErrorMediaReason
impl PartialEq for ApiErrorMediaReason
Source§impl Serialize for ApiErrorMediaReason
impl Serialize for ApiErrorMediaReason
impl StructuralPartialEq for ApiErrorMediaReason
Auto Trait Implementations§
impl Freeze for ApiErrorMediaReason
impl RefUnwindSafe for ApiErrorMediaReason
impl Send for ApiErrorMediaReason
impl Sync for ApiErrorMediaReason
impl Unpin for ApiErrorMediaReason
impl UnsafeUnpin for ApiErrorMediaReason
impl UnwindSafe for ApiErrorMediaReason
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