#[non_exhaustive]pub struct ImageOutputOptions {
pub mime_type: Option<String>,
pub compression_quality: Option<i32>,
/* private fields */
}Available on crate features
gen-ai-tuning-service or llm-utility-service or prediction-service only.Expand description
The image output format for generated images.
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.mime_type: Option<String>Optional. The image format that the output should be saved as.
compression_quality: Option<i32>Optional. The compression quality of the output image.
Implementations§
Source§impl ImageOutputOptions
impl ImageOutputOptions
pub fn new() -> Self
Sourcepub fn set_mime_type<T>(self, v: T) -> Self
pub fn set_mime_type<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_mime_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mime_type<T>(self, v: Option<T>) -> Self
Sourcepub fn set_compression_quality<T>(self, v: T) -> Self
pub fn set_compression_quality<T>(self, v: T) -> Self
Sets the value of compression_quality.
§Example
ⓘ
let x = ImageOutputOptions::new().set_compression_quality(42);Sourcepub fn set_or_clear_compression_quality<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_compression_quality<T>(self, v: Option<T>) -> Self
Sets or clears the value of compression_quality.
§Example
ⓘ
let x = ImageOutputOptions::new().set_or_clear_compression_quality(Some(42));
let x = ImageOutputOptions::new().set_or_clear_compression_quality(None::<i32>);Trait Implementations§
Source§impl Clone for ImageOutputOptions
impl Clone for ImageOutputOptions
Source§fn clone(&self) -> ImageOutputOptions
fn clone(&self) -> ImageOutputOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageOutputOptions
impl Debug for ImageOutputOptions
Source§impl Default for ImageOutputOptions
impl Default for ImageOutputOptions
Source§fn default() -> ImageOutputOptions
fn default() -> ImageOutputOptions
Returns the “default value” for a type. Read more
Source§impl Message for ImageOutputOptions
impl Message for ImageOutputOptions
Source§impl PartialEq for ImageOutputOptions
impl PartialEq for ImageOutputOptions
impl StructuralPartialEq for ImageOutputOptions
Auto Trait Implementations§
impl Freeze for ImageOutputOptions
impl RefUnwindSafe for ImageOutputOptions
impl Send for ImageOutputOptions
impl Sync for ImageOutputOptions
impl Unpin for ImageOutputOptions
impl UnsafeUnpin for ImageOutputOptions
impl UnwindSafe for ImageOutputOptions
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