Struct async_openai::types::ImagesResponse
source · pub struct ImagesResponse {
pub created: u32,
pub data: Vec<Arc<Image>>,
}
Fields§
§created: u32
§data: Vec<Arc<Image>>
Implementations§
source§impl ImagesResponse
impl ImagesResponse
sourcepub async fn save<P: AsRef<Path>>(
&self,
dir: P
) -> Result<Vec<PathBuf>, OpenAIError>
pub async fn save<P: AsRef<Path>>( &self, dir: P ) -> Result<Vec<PathBuf>, OpenAIError>
Save each image in a dedicated Tokio task and return paths to saved files. For ResponseFormat::Url each file is downloaded in dedicated Tokio task.
Trait Implementations§
source§impl Clone for ImagesResponse
impl Clone for ImagesResponse
source§fn clone(&self) -> ImagesResponse
fn clone(&self) -> ImagesResponse
Returns a copy of the value. Read more
1.0.0 · 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 ImagesResponse
impl Debug for ImagesResponse
source§impl<'de> Deserialize<'de> for ImagesResponse
impl<'de> Deserialize<'de> for ImagesResponse
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
source§impl PartialEq for ImagesResponse
impl PartialEq for ImagesResponse
source§fn eq(&self, other: &ImagesResponse) -> bool
fn eq(&self, other: &ImagesResponse) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ImagesResponse
impl Serialize for ImagesResponse
impl StructuralPartialEq for ImagesResponse
Auto Trait Implementations§
impl RefUnwindSafe for ImagesResponse
impl Send for ImagesResponse
impl Sync for ImagesResponse
impl Unpin for ImagesResponse
impl UnwindSafe for ImagesResponse
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