pub struct ImageCreateRequest {
pub model: ModelKind,
pub api_key: Option<String>,
pub width: usize,
pub height: usize,
pub prompt: String,
pub apply_watermark: bool,
pub timeout: Option<u64>,
pub max_retry: usize,
pub sleep_between_retries: u64,
}
Fields§
§model: ModelKind
§api_key: Option<String>
§width: usize
§height: usize
§prompt: String
§apply_watermark: bool
§timeout: Option<u64>
milliseconds
max_retry: usize
It tries 1 + max_retry times.
sleep_between_retries: u64
milliseconds
Implementations§
source§impl CreateRequest
impl CreateRequest
pub fn build_json_body(&self) -> JsonValue
sourcepub fn blocking_send(&self) -> Result<CreateResponse, Error>
pub fn blocking_send(&self) -> Result<CreateResponse, Error>
It panics if its fields are not complete. If you’re not sure, run self.is_valid()
before sending a request.
sourcepub async fn send(&self) -> Result<CreateResponse, Error>
pub async fn send(&self) -> Result<CreateResponse, Error>
It panics if its fields are not complete. If you’re not sure, run self.is_valid()
before sending a request.
Auto Trait Implementations§
impl Freeze for CreateRequest
impl RefUnwindSafe for CreateRequest
impl Send for CreateRequest
impl Sync for CreateRequest
impl Unpin for CreateRequest
impl UnwindSafe for CreateRequest
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