#[non_exhaustive]pub struct ImageConfig {
pub aspect_ratio: Option<String>,
/* private fields */
}Available on crate features
llm-utility-service or prediction-service only.Expand description
Config for image generation features.
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.aspect_ratio: Option<String>Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:
“1:1” “2:3”, “3:2” “3:4”, “4:3” “4:5”, “5:4” “9:16”, “16:9” “21:9”
Implementations§
Source§impl ImageConfig
impl ImageConfig
pub fn new() -> Self
Sourcepub fn set_aspect_ratio<T>(self, v: T) -> Self
pub fn set_aspect_ratio<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_aspect_ratio<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_aspect_ratio<T>(self, v: Option<T>) -> Self
Sets or clears the value of aspect_ratio.
§Example
ⓘ
let x = ImageConfig::new().set_or_clear_aspect_ratio(Some("example"));
let x = ImageConfig::new().set_or_clear_aspect_ratio(None::<String>);Trait Implementations§
Source§impl Clone for ImageConfig
impl Clone for ImageConfig
Source§fn clone(&self) -> ImageConfig
fn clone(&self) -> ImageConfig
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 ImageConfig
impl Debug for ImageConfig
Source§impl Default for ImageConfig
impl Default for ImageConfig
Source§fn default() -> ImageConfig
fn default() -> ImageConfig
Returns the “default value” for a type. Read more
Source§impl Message for ImageConfig
impl Message for ImageConfig
Source§impl PartialEq for ImageConfig
impl PartialEq for ImageConfig
impl StructuralPartialEq for ImageConfig
Auto Trait Implementations§
impl Freeze for ImageConfig
impl RefUnwindSafe for ImageConfig
impl Send for ImageConfig
impl Sync for ImageConfig
impl Unpin for ImageConfig
impl UnwindSafe for ImageConfig
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