pub enum TaskRequest {
Show 13 variants
TextToModel(TextToModelRequest),
ImageToModel(ImageToModelRequest),
MultiviewToModel(MultiviewToModelRequest),
ConvertModel(ConvertModelRequest),
Stylize(StylizeModelRequest),
TextureModel(TextureModelRequest),
Refine(RefineModelRequest),
CheckRiggable(CheckRiggableRequest),
Rig(RigModelRequest),
Retarget(RetargetAnimationRequest),
MeshSegmentation(MeshSegmentationRequest),
MeshCompletion(MeshCompletionRequest),
SmartLowpoly(SmartLowpolyRequest),
}Expand description
Task creation request body. type tag is set by serde.
Note: four variants have wire-level type strings that differ from the
Rust variant name — #[serde(rename = "...")] per variant handles this.
Variants§
TextToModel(TextToModelRequest)
text_to_model — generate a 3D model from a text prompt.
ImageToModel(ImageToModelRequest)
image_to_model — generate a 3D model from a single image.
MultiviewToModel(MultiviewToModelRequest)
multiview_to_model — generate from multiple images (front/back/left/right).
ConvertModel(ConvertModelRequest)
convert_model — convert a completed model to another file format.
Stylize(StylizeModelRequest)
stylize_model — apply a stylization preset (lego/voxel/etc).
TextureModel(TextureModelRequest)
texture_model — (re)texture an existing model.
Refine(RefineModelRequest)
refine_model — turn a draft model into a finished one.
CheckRiggable(CheckRiggableRequest)
check_riggable — precheck whether a model can be rigged.
Rig(RigModelRequest)
rig_model — generate a skeletal rig for an existing model.
Retarget(RetargetAnimationRequest)
retarget_animation — retarget animations onto a rigged model.
MeshSegmentation(MeshSegmentationRequest)
mesh_segmentation — decompose a model into semantic parts.
MeshCompletion(MeshCompletionRequest)
mesh_completion — fill holes in an existing mesh.
SmartLowpoly(SmartLowpolyRequest)
smart_lowpoly — reduce a high-poly model to a lowpoly one. Wire: highpoly_to_lowpoly.
Implementations§
Source§impl TaskRequest
impl TaskRequest
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Client-side request validation. Dispatches to per-variant validate().
Called from Client::create_task before the POST so bad requests cost
nothing and produce a usable error message.
Sourcepub async fn upload_images(&mut self, client: &Client) -> Result<()>
pub async fn upload_images(&mut self, client: &Client) -> Result<()>
Walk the request, uploading any ImageInput::Path entries to file_tokens.
Call this before serializing & sending.
Trait Implementations§
Source§impl Clone for TaskRequest
impl Clone for TaskRequest
Source§fn clone(&self) -> TaskRequest
fn clone(&self) -> TaskRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskRequest
impl Debug for TaskRequest
Source§impl<'de> Deserialize<'de> for TaskRequest
impl<'de> Deserialize<'de> for TaskRequest
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>,
Source§impl JsonSchema for TaskRequest
impl JsonSchema for TaskRequest
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more