#[non_exhaustive]pub struct ImageRequest {
pub prompt: String,
pub size: Option<String>,
pub quality: Option<String>,
pub name: Option<String>,
}Expand description
A request to generate an image.
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.prompt: StringWhat to draw.
size: Option<String>Size, in the format of the provider (for example 1024x1024). Not sent when None.
quality: Option<String>Quality, in the format of the provider (for example high). Not sent when None.
name: Option<String>File name of the image, set as Media::name and so passed to the storage. Not sent
to the provider. Without an extension, the one of the image type is added.
Implementations§
Source§impl ImageRequest
impl ImageRequest
Sourcepub fn with_quality(self, quality: impl Into<String>) -> Self
pub fn with_quality(self, quality: impl Into<String>) -> Self
Sets the quality.
Sourcepub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_name(self, name: impl Into<String>) -> Self
Sets the file name of the image, see ImageRequest::name.
Trait Implementations§
Source§impl Clone for ImageRequest
impl Clone for ImageRequest
Source§impl Debug for ImageRequest
impl Debug for ImageRequest
Source§impl PartialEq for ImageRequest
impl PartialEq for ImageRequest
impl StructuralPartialEq for ImageRequest
Auto Trait Implementations§
impl Freeze for ImageRequest
impl RefUnwindSafe for ImageRequest
impl Send for ImageRequest
impl Sync for ImageRequest
impl Unpin for ImageRequest
impl UnsafeUnpin for ImageRequest
impl UnwindSafe for ImageRequest
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