pub trait TaskTypeName {
// Required method
fn task_type_name(&self) -> &str;
}Expand description
Source of the type value sent with a task.
Implemented for TaskType and for plain strings, so a task type the
service adds after this release can still be used without waiting for an
SDK update: pass the type name directly.
// A modelled type
client.create_task(TaskType::RecaptchaV2TaskProxyless, &task).await?;
// The escape hatch: a type the service added that the SDK has yet to model
client.create_task("BrandNewTaskType", &task).await?;Required Methods§
Sourcefn task_type_name(&self) -> &str
fn task_type_name(&self) -> &str
Returns the wire value written to the type field.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".