pub struct DataForSeoApiResponseData<R> {
pub version: String,
pub status_code: i32,
pub status_message: String,
pub time: String,
pub cost: f64,
pub tasks_count: i32,
pub tasks_error: i32,
pub limit: Option<i32>,
pub offset: Option<i32>,
pub sort: Option<String>,
pub include_metadata: Option<bool>,
pub tasks: Option<Vec<DataForSeoApiTask<R>>>,
}Expand description
Top-level response envelope shared by every DataForSEO endpoint.
Fields§
§version: StringCurrent API version.
status_code: i32General status code of the request; 20000 means “Ok”.
See https://docs.dataforseo.com/v3/appendix/errors/.
status_message: StringInformational message accompanying status_code.
time: StringTotal execution time.
cost: f64Total cost of the request in USD.
tasks_count: i32Number of tasks in the tasks array.
tasks_error: i32Number of tasks that returned an error.
limit: Option<i32>Echo of the limit request parameter, where applicable.
offset: Option<i32>Echo of the offset request parameter, where applicable.
sort: Option<String>Echo of the sort request parameter, where applicable.
include_metadata: Option<bool>Echo of the include_metadata request parameter, where applicable.
tasks: Option<Vec<DataForSeoApiTask<R>>>Tasks executed within this request.
Implementations§
Source§impl<R> DataForSeoApiResponseData<R>
impl<R> DataForSeoApiResponseData<R>
Sourcepub fn tasks(&self) -> &[DataForSeoApiTask<R>]
pub fn tasks(&self) -> &[DataForSeoApiTask<R>]
All tasks in the response (empty slice when the API returned none).
Sourcepub fn into_tasks(self) -> Vec<DataForSeoApiTask<R>>
pub fn into_tasks(self) -> Vec<DataForSeoApiTask<R>>
Consumes the response and returns its tasks.
Sourcepub fn into_results(self) -> Vec<R>
pub fn into_results(self) -> Vec<R>
Consumes the response and returns every result of every task.
Sourcepub fn first_result(&self) -> Option<&R>
pub fn first_result(&self) -> Option<&R>
First result across all tasks, if any.