#[non_exhaustive]pub struct ImageEditRequest {
pub prompt: String,
pub images: Vec<Media>,
pub size: Option<String>,
pub quality: Option<String>,
pub name: Option<String>,
}Expand description
A request to edit images, or to make a new image from them.
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 change.
images: Vec<Media>The images to edit.
size: Option<String>Size, see ImageRequest::size.
quality: Option<String>Quality, see ImageRequest::quality.
name: Option<String>File name of the new image, see ImageRequest::name.
Implementations§
Source§impl ImageEditRequest
impl ImageEditRequest
Sourcepub fn new(prompt: impl Into<String>, images: Vec<Media>) -> Self
pub fn new(prompt: impl Into<String>, images: Vec<Media>) -> Self
Creates a request with a prompt and the images to edit.
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 ImageEditRequest
impl Clone for ImageEditRequest
Source§impl Debug for ImageEditRequest
impl Debug for ImageEditRequest
Source§impl PartialEq for ImageEditRequest
impl PartialEq for ImageEditRequest
impl StructuralPartialEq for ImageEditRequest
Auto Trait Implementations§
impl Freeze for ImageEditRequest
impl RefUnwindSafe for ImageEditRequest
impl Send for ImageEditRequest
impl Sync for ImageEditRequest
impl Unpin for ImageEditRequest
impl UnsafeUnpin for ImageEditRequest
impl UnwindSafe for ImageEditRequest
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