#[non_exhaustive]pub struct ImageLimits {
pub max: u64,
pub max_bytes_each: u64,
pub max_bytes_total: u64,
pub formats: Vec<String>,
}Expand description
A model’s image limits per item, as an extractor role.describe entry
states them: {max, max_bytes_each, max_bytes_total, formats}.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max: u64Most images in one item.
max_bytes_each: u64Largest image, in decoded bytes.
max_bytes_total: u64Largest total of one item’s images, in decoded bytes.
formats: Vec<String>The content types accepted, a subset of content_types::ALL.
Implementations§
Source§impl ImageLimits
impl ImageLimits
pub fn new( max: u64, max_bytes_each: u64, max_bytes_total: u64, formats: Vec<String>, ) -> Self
Sourcepub fn workers_ai(max: u64) -> Self
pub fn workers_ai(max: u64) -> Self
Workers AI’s limits (IMAGE_MAX_BYTES each,
IMAGES_MAX_TOTAL_BYTES in total, every format) with at most
max images.
Trait Implementations§
Source§impl Clone for ImageLimits
impl Clone for ImageLimits
Source§impl Debug for ImageLimits
impl Debug for ImageLimits
Source§impl<'de> Deserialize<'de> for ImageLimits
impl<'de> Deserialize<'de> for ImageLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ImageLimits
Source§impl PartialEq for ImageLimits
impl PartialEq for ImageLimits
Source§impl Serialize for ImageLimits
impl Serialize for ImageLimits
impl StructuralPartialEq for ImageLimits
Auto Trait Implementations§
impl Freeze for ImageLimits
impl RefUnwindSafe for ImageLimits
impl Send for ImageLimits
impl Sync for ImageLimits
impl Unpin for ImageLimits
impl UnsafeUnpin for ImageLimits
impl UnwindSafe for ImageLimits
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