From f177c976710e0e9b273ad513a021156578c785a1 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Mon, 17 Oct 2022 14:02:14 +0200 Subject: [PATCH] Add the canceled task status --- meilisearch-types/src/tasks.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meilisearch-types/src/tasks.rs b/meilisearch-types/src/tasks.rs index 98994c072..d7b0f5fb7 100644 --- a/meilisearch-types/src/tasks.rs +++ b/meilisearch-types/src/tasks.rs @@ -271,6 +271,7 @@ pub enum Status { Processing, Succeeded, Failed, + Canceled, } impl Display for Status { @@ -280,6 +281,7 @@ impl Display for Status { Status::Processing => write!(f, "processing"), Status::Succeeded => write!(f, "succeeded"), Status::Failed => write!(f, "failed"), + Status::Canceled => write!(f, "canceled"), } } } @@ -296,6 +298,8 @@ impl FromStr for Status { Ok(Status::Succeeded) } else if status.eq_ignore_ascii_case("failed") { Ok(Status::Failed) + } else if status.eq_ignore_ascii_case("canceled") { + Ok(Status::Canceled) } else { Err(ResponseError::from_msg( format!(