#[non_exhaustive]pub enum ImageLimit {
TooMany {
count: usize,
},
ImageTooLarge {
index: usize,
encoded_bytes: usize,
},
TotalTooLarge {
encoded_bytes: usize,
},
}Expand description
Which image bound a Prompt crossed (issue #628): the count, one
image’s encoded size, or the whole prompt’s. Carries only sizes and
indices — never user content — so it is safe in a log line as-is.
#[non_exhaustive]: another bound should not break every match.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TooMany
The prompt carries more than MAX_PROMPT_IMAGES images.
ImageTooLarge
The image at 0-based index among the prompt’s images encodes to
more than MAX_IMAGE_ENCODED_BYTES base64 bytes.
TotalTooLarge
The prompt’s images encode to more than
MAX_PROMPT_IMAGE_ENCODED_BYTES base64 bytes together.
Trait Implementations§
Source§impl Clone for ImageLimit
impl Clone for ImageLimit
impl Copy for ImageLimit
Source§impl Debug for ImageLimit
impl Debug for ImageLimit
Source§impl Display for ImageLimit
impl Display for ImageLimit
impl Eq for ImageLimit
Source§impl PartialEq for ImageLimit
impl PartialEq for ImageLimit
impl StructuralPartialEq for ImageLimit
Auto Trait Implementations§
impl Freeze for ImageLimit
impl RefUnwindSafe for ImageLimit
impl Send for ImageLimit
impl Sync for ImageLimit
impl Unpin for ImageLimit
impl UnsafeUnpin for ImageLimit
impl UnwindSafe for ImageLimit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.