pub struct GenerationParameters {Show 13 fields
pub n: u8,
pub size: ImageSize,
pub aspect_ratio: Option<AspectRatio>,
pub resolution: Option<Resolution>,
pub quality: Quality,
pub output_format: OutputFormat,
pub output_compression: Option<u8>,
pub background: Background,
pub moderation: Moderation,
pub partial_images: u8,
pub failure_policy: MultiImageFailurePolicy,
pub input_fidelity: Option<InputFidelity>,
pub action: ImageAction,
}Expand description
Image-generation parameters shared across providers.
Fields§
§n: u8Number of requested output images.
size: ImageSizeAutomatic or explicit output size.
aspect_ratio: Option<AspectRatio>Optional aspect-ratio hint.
resolution: Option<Resolution>Optional coarse resolution hint.
quality: QualityRequested quality.
output_format: OutputFormatRequested encoded image format.
output_compression: Option<u8>Compression from 0 to 100 for JPEG or WebP.
background: BackgroundRequested background behavior.
moderation: ModerationRequested moderation behavior.
partial_images: u8Requested number of partial progress images.
failure_policy: MultiImageFailurePolicyBehavior when one output in a multi-image request fails.
input_fidelity: Option<InputFidelity>Optional input-image fidelity for edit/reference operations.
action: ImageActionGenerate/edit selection for transports with an image tool action.
Trait Implementations§
Source§impl Clone for GenerationParameters
impl Clone for GenerationParameters
Source§fn clone(&self) -> GenerationParameters
fn clone(&self) -> GenerationParameters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GenerationParameters
impl Debug for GenerationParameters
Source§impl Default for GenerationParameters
impl Default for GenerationParameters
Source§impl<'de> Deserialize<'de> for GenerationParameterswhere
GenerationParameters: Default,
impl<'de> Deserialize<'de> for GenerationParameterswhere
GenerationParameters: Default,
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 GenerationParameters
Source§impl JsonSchema for GenerationParameters
impl JsonSchema for GenerationParameters
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for GenerationParameters
impl PartialEq for GenerationParameters
Source§impl Serialize for GenerationParameters
impl Serialize for GenerationParameters
impl StructuralPartialEq for GenerationParameters
Auto Trait Implementations§
impl Freeze for GenerationParameters
impl RefUnwindSafe for GenerationParameters
impl Send for GenerationParameters
impl Sync for GenerationParameters
impl Unpin for GenerationParameters
impl UnsafeUnpin for GenerationParameters
impl UnwindSafe for GenerationParameters
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