pub struct ImageGenClient { /* private fields */ }Implementations§
Source§impl ImageGenClient
impl ImageGenClient
pub fn new(provider: ResolvedImageProvider) -> Self
Sourcepub async fn generate(
&self,
req: &ImageGenRequest,
) -> Result<Vec<GeneratedImage>, ImageGenError>
pub async fn generate( &self, req: &ImageGenRequest, ) -> Result<Vec<GeneratedImage>, ImageGenError>
Generate images from a text prompt.
Returns one GeneratedImage per image the API actually produced.
The number returned may be less than the requested n (e.g. due to
content filtering); it is always taken from the API response.
Auto Trait Implementations§
impl !RefUnwindSafe for ImageGenClient
impl !UnwindSafe for ImageGenClient
impl Freeze for ImageGenClient
impl Send for ImageGenClient
impl Sync for ImageGenClient
impl Unpin for ImageGenClient
impl UnsafeUnpin for ImageGenClient
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