pub struct ImageGenOptions {Show 15 fields
pub count: Option<u8>,
pub aspect_ratio: Option<AspectRatio>,
pub width: Option<u32>,
pub height: Option<u32>,
pub seed: Option<u64>,
pub negative_prompt: Option<String>,
pub guidance_scale: Option<f32>,
pub output_format: Option<ImageFormat>,
pub safety_level: Option<SafetyLevel>,
pub enhance_prompt: Option<bool>,
pub resolution: Option<ImageResolution>,
pub enable_web_search: Option<bool>,
pub thinking_level: Option<ThinkingLevel>,
pub reference_images: Vec<String>,
pub extra: HashMap<String, Value>,
}Expand description
Shared provider options.
Fields§
§count: Option<u8>§aspect_ratio: Option<AspectRatio>§width: Option<u32>§height: Option<u32>§seed: Option<u64>§negative_prompt: Option<String>§guidance_scale: Option<f32>§output_format: Option<ImageFormat>§safety_level: Option<SafetyLevel>§enhance_prompt: Option<bool>§resolution: Option<ImageResolution>§enable_web_search: Option<bool>§thinking_level: Option<ThinkingLevel>§reference_images: Vec<String>§extra: HashMap<String, Value>Implementations§
Source§impl ImageGenOptions
impl ImageGenOptions
pub fn aspect_ratio_or_default(&self) -> AspectRatio
pub fn count_or_default(&self) -> u8
pub fn output_format_or_default(&self) -> ImageFormat
pub fn safety_level_or_default(&self) -> SafetyLevel
pub fn resolution_or_default(&self) -> ImageResolution
Trait Implementations§
Source§impl Clone for ImageGenOptions
impl Clone for ImageGenOptions
Source§fn clone(&self) -> ImageGenOptions
fn clone(&self) -> ImageGenOptions
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 ImageGenOptions
impl Debug for ImageGenOptions
Source§impl Default for ImageGenOptions
impl Default for ImageGenOptions
Source§fn default() -> ImageGenOptions
fn default() -> ImageGenOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ImageGenOptions
impl<'de> Deserialize<'de> for ImageGenOptions
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
Auto Trait Implementations§
impl Freeze for ImageGenOptions
impl RefUnwindSafe for ImageGenOptions
impl Send for ImageGenOptions
impl Sync for ImageGenOptions
impl Unpin for ImageGenOptions
impl UnsafeUnpin for ImageGenOptions
impl UnwindSafe for ImageGenOptions
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