pub struct ImageGenerationResponse<T> {
pub image: Vec<u8>,
pub response: T,
}Available on crate feature
image only.Expand description
A unified response for a model image generation, returning both the image and the raw response.
Fields§
§image: Vec<u8>§response: TTrait Implementations§
Source§impl<T> Debug for ImageGenerationResponse<T>where
T: Debug,
impl<T> Debug for ImageGenerationResponse<T>where
T: Debug,
Source§impl TryFrom<GenerateContentResponse> for ImageGenerationResponse<GenerateContentResponse>
impl TryFrom<GenerateContentResponse> for ImageGenerationResponse<GenerateContentResponse>
Source§type Error = ImageGenerationError
type Error = ImageGenerationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: GenerateContentResponse,
) -> Result<ImageGenerationResponse<GenerateContentResponse>, <ImageGenerationResponse<GenerateContentResponse> as TryFrom<GenerateContentResponse>>::Error>
fn try_from( value: GenerateContentResponse, ) -> Result<ImageGenerationResponse<GenerateContentResponse>, <ImageGenerationResponse<GenerateContentResponse> as TryFrom<GenerateContentResponse>>::Error>
Performs the conversion.
Source§impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
Source§type Error = ImageGenerationError
type Error = ImageGenerationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ImageGenerationResponse,
) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
fn try_from( value: ImageGenerationResponse, ) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
Performs the conversion.
Source§impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
Source§type Error = ImageGenerationError
type Error = ImageGenerationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ImageGenerationResponse,
) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
fn try_from( value: ImageGenerationResponse, ) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
Performs the conversion.
Source§impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
Source§type Error = ImageGenerationError
type Error = ImageGenerationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ImageGenerationResponse,
) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
fn try_from( value: ImageGenerationResponse, ) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
Performs the conversion.
Source§impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
impl TryFrom<ImageGenerationResponse> for ImageGenerationResponse<ImageGenerationResponse>
Source§type Error = ImageGenerationError
type Error = ImageGenerationError
The type returned in the event of a conversion error.
Source§fn try_from(
value: ImageGenerationResponse,
) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
fn try_from( value: ImageGenerationResponse, ) -> Result<ImageGenerationResponse<ImageGenerationResponse>, <ImageGenerationResponse<ImageGenerationResponse> as TryFrom<ImageGenerationResponse>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl<T> Freeze for ImageGenerationResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for ImageGenerationResponse<T>where
T: RefUnwindSafe,
impl<T> Send for ImageGenerationResponse<T>where
T: Send,
impl<T> Sync for ImageGenerationResponse<T>where
T: Sync,
impl<T> Unpin for ImageGenerationResponse<T>where
T: Unpin,
impl<T> UnsafeUnpin for ImageGenerationResponse<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ImageGenerationResponse<T>where
T: 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