@@ -51,7 +51,7 @@ impl Key {
5151 /// # client.delete_key(key).await.unwrap();
5252 /// # });
5353 /// ```
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 {
5555 self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
5656 self
5757 }
@@ -82,7 +82,7 @@ impl Key {
8282 /// # client.delete_key(key).await.unwrap();
8383 /// # });
8484 /// ```
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 {
8686 self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
8787 self
8888 }
@@ -208,7 +208,7 @@ impl KeyUpdater {
208208 /// # client.delete_key(key_update).await.unwrap();
209209 /// # });
210210 /// ```
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 {
212212 self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
213213 self
214214 }
@@ -241,7 +241,7 @@ impl KeyUpdater {
241241 /// # client.delete_key(key_update).await.unwrap();
242242 /// # });
243243 /// ```
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 {
245245 self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
246246 self
247247 }
@@ -454,7 +454,7 @@ impl KeyBuilder {
454454 /// let mut builder = KeyBuilder::new();
455455 /// builder.with_actions(vec![Action::Search, Action::DocumentsAdd]);
456456 /// ```
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 {
458458 self . actions . extend ( actions) ;
459459 self
460460 }
@@ -468,7 +468,7 @@ impl KeyBuilder {
468468 /// let mut builder = KeyBuilder::new();
469469 /// builder.with_action(Action::DocumentsAdd);
470470 /// ```
471- pub fn with_action ( & mut self , action : Action ) -> & mut Self {
471+ pub fn with_action ( & mut self , action : Action ) -> & mut KeyBuilder {
472472 self . actions . push ( action) ;
473473 self
474474 }
@@ -484,7 +484,7 @@ impl KeyBuilder {
484484 /// // create a key that expires in two weeks from now
485485 /// builder.with_expires_at(OffsetDateTime::now_utc() + Duration::WEEK * 2);
486486 /// ```
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 {
488488 self . expires_at = Some ( expires_at) ;
489489 self
490490 }
@@ -514,7 +514,7 @@ impl KeyBuilder {
514514 pub fn with_indexes (
515515 & mut self ,
516516 indexes : impl IntoIterator < Item = impl AsRef < str > > ,
517- ) -> & mut Self {
517+ ) -> & mut KeyBuilder {
518518 self . indexes = indexes
519519 . into_iter ( )
520520 . map ( |index| index. as_ref ( ) . to_string ( ) )
@@ -531,7 +531,7 @@ impl KeyBuilder {
531531 /// let mut builder = KeyBuilder::new();
532532 /// builder.with_index("test");
533533 /// ```
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 {
535535 self . indexes . push ( index. as_ref ( ) . to_string ( ) ) ;
536536 self
537537 }
@@ -557,7 +557,7 @@ impl KeyBuilder {
557557 /// # client.delete_key(key).await.unwrap();
558558 /// # });
559559 /// ```
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 {
561561 self . description = Some ( desc. as_ref ( ) . to_string ( ) ) ;
562562 self
563563 }
@@ -583,7 +583,7 @@ impl KeyBuilder {
583583 /// # client.delete_key(key).await.unwrap();
584584 /// # });
585585 /// ```
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 {
587587 self . name = Some ( desc. as_ref ( ) . to_string ( ) ) ;
588588 self
589589 }
@@ -609,7 +609,7 @@ impl KeyBuilder {
609609 /// # client.delete_key(key).await.unwrap();
610610 /// # });
611611 /// ```
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 {
613613 self . uid = Some ( desc. as_ref ( ) . to_string ( ) ) ;
614614 self
615615 }
0 commit comments