pub struct CompressedImage {
pub bytes: Vec<u8>,
pub mime: String,
pub orig_dims: (u32, u32),
pub new_dims: (u32, u32),
pub kept_original: bool,
}Expand description
Result of preparing an image for the vision-model context.
Fields§
§bytes: Vec<u8>Encoded image bytes (possibly the untouched original).
mime: StringMIME type of bytes.
orig_dims: (u32, u32)Original (width, height); (0, 0) when unknown (passthrough).
new_dims: (u32, u32)Final (width, height); (0, 0) when unknown (passthrough).
kept_original: boolTrue when the original bytes were kept (GIF, compression disabled, or re-encoding would have grown the file).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompressedImage
impl RefUnwindSafe for CompressedImage
impl Send for CompressedImage
impl Sync for CompressedImage
impl Unpin for CompressedImage
impl UnsafeUnpin for CompressedImage
impl UnwindSafe for CompressedImage
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