@@ -51,7 +51,7 @@ impl Key {
51
51
/// # client.delete_key(key).await.unwrap();
52
52
/// # });
53
53
/// ```
54
- pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
54
+ pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut Key {
55
55
self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
56
56
self
57
57
}
@@ -82,7 +82,7 @@ impl Key {
82
82
/// # client.delete_key(key).await.unwrap();
83
83
/// # });
84
84
/// ```
85
- pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
85
+ pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut Key {
86
86
self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
87
87
self
88
88
}
@@ -208,7 +208,7 @@ impl KeyUpdater {
208
208
/// # client.delete_key(key_update).await.unwrap();
209
209
/// # });
210
210
/// ```
211
- pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
211
+ pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut KeyUpdater {
212
212
self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
213
213
self
214
214
}
@@ -241,7 +241,7 @@ impl KeyUpdater {
241
241
/// # client.delete_key(key_update).await.unwrap();
242
242
/// # });
243
243
/// ```
244
- pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
244
+ pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut KeyUpdater {
245
245
self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
246
246
self
247
247
}
@@ -454,7 +454,7 @@ impl KeyBuilder {
454
454
/// let mut builder = KeyBuilder::new();
455
455
/// builder.with_actions(vec![Action::Search, Action::DocumentsAdd]);
456
456
/// ```
457
- pub fn with_actions ( & mut self , actions : impl IntoIterator < Item = Action > ) -> & mut Self {
457
+ pub fn with_actions ( & mut self , actions : impl IntoIterator < Item = Action > ) -> & mut KeyBuilder {
458
458
self . actions . extend ( actions) ;
459
459
self
460
460
}
@@ -468,7 +468,7 @@ impl KeyBuilder {
468
468
/// let mut builder = KeyBuilder::new();
469
469
/// builder.with_action(Action::DocumentsAdd);
470
470
/// ```
471
- pub fn with_action ( & mut self , action : Action ) -> & mut Self {
471
+ pub fn with_action ( & mut self , action : Action ) -> & mut KeyBuilder {
472
472
self . actions . push ( action) ;
473
473
self
474
474
}
@@ -484,7 +484,7 @@ impl KeyBuilder {
484
484
/// // create a key that expires in two weeks from now
485
485
/// builder.with_expires_at(OffsetDateTime::now_utc() + Duration::WEEK * 2);
486
486
/// ```
487
- pub fn with_expires_at ( & mut self , expires_at : OffsetDateTime ) -> & mut Self {
487
+ pub fn with_expires_at ( & mut self , expires_at : OffsetDateTime ) -> & mut KeyBuilder {
488
488
self . expires_at = Some ( expires_at) ;
489
489
self
490
490
}
@@ -514,7 +514,7 @@ impl KeyBuilder {
514
514
pub fn with_indexes (
515
515
& mut self ,
516
516
indexes : impl IntoIterator < Item = impl AsRef < str > > ,
517
- ) -> & mut Self {
517
+ ) -> & mut KeyBuilder {
518
518
self . indexes = indexes
519
519
. into_iter ( )
520
520
. map ( |index| index. as_ref ( ) . to_string ( ) )
@@ -531,7 +531,7 @@ impl KeyBuilder {
531
531
/// let mut builder = KeyBuilder::new();
532
532
/// builder.with_index("test");
533
533
/// ```
534
- pub fn with_index ( & mut self , index : impl AsRef < str > ) -> & mut Self {
534
+ pub fn with_index ( & mut self , index : impl AsRef < str > ) -> & mut KeyBuilder {
535
535
self . indexes . push ( index. as_ref ( ) . to_string ( ) ) ;
536
536
self
537
537
}
@@ -557,7 +557,7 @@ impl KeyBuilder {
557
557
/// # client.delete_key(key).await.unwrap();
558
558
/// # });
559
559
/// ```
560
- pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
560
+ pub fn with_description ( & mut self , desc : impl AsRef < str > ) -> & mut KeyBuilder {
561
561
self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
562
562
self
563
563
}
@@ -583,7 +583,7 @@ impl KeyBuilder {
583
583
/// # client.delete_key(key).await.unwrap();
584
584
/// # });
585
585
/// ```
586
- pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
586
+ pub fn with_name ( & mut self , desc : impl AsRef < str > ) -> & mut KeyBuilder {
587
587
self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
588
588
self
589
589
}
@@ -609,7 +609,7 @@ impl KeyBuilder {
609
609
/// # client.delete_key(key).await.unwrap();
610
610
/// # });
611
611
/// ```
612
- pub fn with_uid ( & mut self , desc : impl AsRef < str > ) -> & mut Self {
612
+ pub fn with_uid ( & mut self , desc : impl AsRef < str > ) -> & mut KeyBuilder {
613
613
self . uid = Some ( desc. as_ref ( ) . to_string ( ) ) ;
614
614
self
615
615
}
0 commit comments