#[non_exhaustive]pub struct ImageGenerationRequestBuilder<M>where
M: ImageGenerationModel,{ /* private fields */ }
Available on crate feature
image
only.Expand description
A builder for ImageGenerationRequest
.
Can be sent to a model provider.
Implementations§
Source§impl<M> ImageGenerationRequestBuilder<M>where
M: ImageGenerationModel,
impl<M> ImageGenerationRequestBuilder<M>where
M: ImageGenerationModel,
pub fn new(model: M) -> Self
Sourcepub fn additional_params(self, params: Value) -> Self
pub fn additional_params(self, params: Value) -> Self
Adds additional parameters to the image generation request.
pub fn build(self) -> ImageGenerationRequest
pub async fn send( self, ) -> Result<ImageGenerationResponse<M::Response>, ImageGenerationError>
Auto Trait Implementations§
impl<M> Freeze for ImageGenerationRequestBuilder<M>where
M: Freeze,
impl<M> RefUnwindSafe for ImageGenerationRequestBuilder<M>where
M: RefUnwindSafe,
impl<M> Send for ImageGenerationRequestBuilder<M>
impl<M> Sync for ImageGenerationRequestBuilder<M>
impl<M> Unpin for ImageGenerationRequestBuilder<M>where
M: Unpin,
impl<M> UnwindSafe for ImageGenerationRequestBuilder<M>where
M: 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more