@@ -38,6 +38,9 @@ pub enum TaskType {
38
38
TaskDeletion {
39
39
details : Option < TaskDeletion > ,
40
40
} ,
41
+ SnapshotCreation {
42
+ details : Option < SnapshotCreation > ,
43
+ } ,
41
44
}
42
45
43
46
#[ derive( Debug , Clone , Deserialize ) ]
@@ -79,6 +82,10 @@ pub struct IndexDeletion {
79
82
pub deleted_documents : Option < usize > ,
80
83
}
81
84
85
+ #[ derive( Debug , Clone , Deserialize ) ]
86
+ #[ serde( rename_all = "camelCase" ) ]
87
+ pub struct SnapshotCreation { }
88
+
82
89
#[ derive( Debug , Clone , Deserialize ) ]
83
90
#[ serde( rename_all = "camelCase" ) ]
84
91
pub struct DumpCreation {
@@ -135,6 +142,7 @@ pub struct SucceededTask {
135
142
pub started_at : OffsetDateTime ,
136
143
#[ serde( with = "time::serde::rfc3339" ) ]
137
144
pub finished_at : OffsetDateTime ,
145
+ pub canceled_by : Option < usize > ,
138
146
pub index_uid : Option < String > ,
139
147
#[ serde( flatten) ]
140
148
pub update_type : TaskType ,
@@ -271,6 +279,7 @@ impl Task {
271
279
/// # index.delete().await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
272
280
/// # });
273
281
/// ```
282
+ #[ allow( clippy:: result_large_err) ] // Since `self` has been consumed, this is not an issue
274
283
pub fn try_make_index ( self , client : & Client ) -> Result < Index , Self > {
275
284
match self {
276
285
Self :: Succeeded {
@@ -504,30 +513,30 @@ pub struct TasksQuery<'a, T> {
504
513
impl < ' a , T > TasksQuery < ' a , T > {
505
514
pub fn with_index_uids < ' b > (
506
515
& ' b mut self ,
507
- index_uid : impl IntoIterator < Item = & ' a str > ,
516
+ index_uids : impl IntoIterator < Item = & ' a str > ,
508
517
) -> & ' b mut TasksQuery < ' a , T > {
509
- self . index_uids = Some ( index_uid . into_iter ( ) . collect ( ) ) ;
518
+ self . index_uids = Some ( index_uids . into_iter ( ) . collect ( ) ) ;
510
519
self
511
520
}
512
521
pub fn with_statuses < ' b > (
513
522
& ' b mut self ,
514
- status : impl IntoIterator < Item = & ' a str > ,
523
+ statuses : impl IntoIterator < Item = & ' a str > ,
515
524
) -> & ' b mut TasksQuery < ' a , T > {
516
- self . statuses = Some ( status . into_iter ( ) . collect ( ) ) ;
525
+ self . statuses = Some ( statuses . into_iter ( ) . collect ( ) ) ;
517
526
self
518
527
}
519
528
pub fn with_types < ' b > (
520
529
& ' b mut self ,
521
- task_type : impl IntoIterator < Item = & ' a str > ,
530
+ task_types : impl IntoIterator < Item = & ' a str > ,
522
531
) -> & ' b mut TasksQuery < ' a , T > {
523
- self . task_types = Some ( task_type . into_iter ( ) . collect ( ) ) ;
532
+ self . task_types = Some ( task_types . into_iter ( ) . collect ( ) ) ;
524
533
self
525
534
}
526
535
pub fn with_uids < ' b > (
527
536
& ' b mut self ,
528
- index_uid : impl IntoIterator < Item = & ' a u32 > ,
537
+ uids : impl IntoIterator < Item = & ' a u32 > ,
529
538
) -> & ' b mut TasksQuery < ' a , T > {
530
- self . uids = Some ( index_uid . into_iter ( ) . collect ( ) ) ;
539
+ self . uids = Some ( uids . into_iter ( ) . collect ( ) ) ;
531
540
self
532
541
}
533
542
pub fn with_before_enqueued_at < ' b > (
0 commit comments