pub struct ImageResponse {
pub created: Option<u64>,
pub data: Option<Vec<ImageDataItem>>,
pub content_filter: Option<Vec<ImageContentFilterInfo>>,
}Expand description
Image generation response payload
Every property is optional in OpenAPI, but a successful response must carry at least one documented, non-null property.
Fields§
§created: Option<u64>Request created time, Unix timestamp (seconds)
data: Option<Vec<ImageDataItem>>Array containing generated image URLs. Currently only one image.
content_filter: Option<Vec<ImageContentFilterInfo>>Content safety related information
Implementations§
Source§impl ImageResponse
impl ImageResponse
Sourcepub fn data(&self) -> Option<&[ImageDataItem]>
pub fn data(&self) -> Option<&[ImageDataItem]>
Generated image items (currently a single item).
Sourcepub fn content_filter(&self) -> Option<&[ImageContentFilterInfo]>
pub fn content_filter(&self) -> Option<&[ImageContentFilterInfo]>
Content-safety filter results, if any.
Trait Implementations§
Source§impl Clone for ImageResponse
impl Clone for ImageResponse
Source§fn clone(&self) -> ImageResponse
fn clone(&self) -> ImageResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageResponse
impl Debug for ImageResponse
Source§impl<'de> Deserialize<'de> for ImageResponse
impl<'de> Deserialize<'de> for ImageResponse
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ImageResponse
impl RefUnwindSafe for ImageResponse
impl Send for ImageResponse
impl Sync for ImageResponse
impl Unpin for ImageResponse
impl UnsafeUnpin for ImageResponse
impl UnwindSafe for ImageResponse
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