pub struct ImageGenRequest<N>where
N: ImageGen,{ /* private fields */ }Expand description
Typed builder for an image-generation request sent through a ZaiClient.
Implementations§
Source§impl<N> ImageGenRequest<N>where
N: ImageGen,
impl<N> ImageGenRequest<N>where
N: ImageGen,
Sourcepub fn body_mut(&mut self) -> &mut ImageGenBody<N>
pub fn body_mut(&mut self) -> &mut ImageGenBody<N>
Mutable access to inner body (for advanced customizations)
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Set prompt text
Sourcepub fn with_quality(self, quality: ImageQuality) -> Self
pub fn with_quality(self, quality: ImageQuality) -> Self
Set image quality
Sourcepub fn with_watermark_enabled(self, watermark_enabled: bool) -> Self
pub fn with_watermark_enabled(self, watermark_enabled: bool) -> Self
Enable/disable watermark
Sourcepub fn with_user_id(self, user_id: impl Into<String>) -> Self
pub fn with_user_id(self, user_id: impl Into<String>) -> Self
Set user id
Auto Trait Implementations§
impl<N> Freeze for ImageGenRequest<N>where
N: Freeze,
impl<N> RefUnwindSafe for ImageGenRequest<N>where
N: RefUnwindSafe,
impl<N> Send for ImageGenRequest<N>where
N: Send,
impl<N> Sync for ImageGenRequest<N>where
N: Sync,
impl<N> Unpin for ImageGenRequest<N>where
N: Unpin,
impl<N> UnsafeUnpin for ImageGenRequest<N>where
N: UnsafeUnpin,
impl<N> UnwindSafe for ImageGenRequest<N>where
N: UnwindSafe,
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