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: T
Trait Implementations§
Source§impl<T: Debug> Debug for ImageGenerationResponse<T>
impl<T: Debug> Debug for ImageGenerationResponse<T>
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§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§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.
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> 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
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