1#[fp_macros::document_module]
45pub(crate) mod inner {
46 use {
47 crate::{
48 classes::{
49 Filterable,
50 RefFilterable,
51 },
52 dispatch::{
53 Ref,
54 Val,
55 },
56 kinds::*,
57 },
58 fp_macros::*,
59 };
60
61 #[document_type_parameters(
70 "The lifetime of the values.",
71 "The brand of the filterable.",
72 "The type of the value(s) inside the filterable.",
73 "The type of the result(s) of applying the function.",
74 "The container type (owned or borrowed), inferred from the argument.",
75 "Dispatch marker type, inferred automatically. Either [`Val`](crate::dispatch::Val) or [`Ref`](crate::dispatch::Ref)."
76 )]
77 #[document_parameters("The closure implementing this dispatch.")]
78 pub trait FilterMapDispatch<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a, B: 'a, FA, Marker> {
79 #[document_signature]
81 #[document_parameters("The filterable instance containing the value(s).")]
83 #[document_returns(
85 "A new filterable instance containing only the values for which the function returned `Some`."
86 )]
87 #[document_examples]
88 fn dispatch(
102 self,
103 fa: FA,
104 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>);
105 }
106
107 #[document_type_parameters(
111 "The lifetime of the values.",
112 "The brand of the filterable.",
113 "The type of the value(s) inside the filterable.",
114 "The type of the result(s) of applying the function.",
115 "The closure type."
116 )]
117 #[document_parameters("The closure that takes owned values.")]
118 impl<'a, Brand, A, B, F>
119 FilterMapDispatch<
120 'a,
121 Brand,
122 A,
123 B,
124 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
125 Val,
126 > for F
127 where
128 Brand: Filterable,
129 A: 'a,
130 B: 'a,
131 F: Fn(A) -> Option<B> + 'a,
132 {
133 #[document_signature]
134 #[document_parameters("The filterable instance containing the value(s).")]
136 #[document_returns(
138 "A new filterable instance containing only the values for which the function returned `Some`."
139 )]
140 #[document_examples]
141 fn dispatch(
155 self,
156 fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
157 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>) {
158 Brand::filter_map(self, fa)
159 }
160 }
161
162 #[document_type_parameters(
168 "The lifetime of the values.",
169 "The borrow lifetime.",
170 "The brand of the filterable.",
171 "The type of the value(s) inside the filterable.",
172 "The type of the result(s) of applying the function.",
173 "The closure type."
174 )]
175 #[document_parameters("The closure that takes references.")]
176 impl<'a, 'b, Brand, A, B, F>
177 FilterMapDispatch<
178 'a,
179 Brand,
180 A,
181 B,
182 &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
183 Ref,
184 > for F
185 where
186 Brand: RefFilterable,
187 A: 'a,
188 B: 'a,
189 F: Fn(&A) -> Option<B> + 'a,
190 {
191 #[document_signature]
192 #[document_parameters("A reference to the filterable instance.")]
194 #[document_returns(
196 "A new filterable instance containing only the values for which the function returned `Some`."
197 )]
198 #[document_examples]
199 fn dispatch(
213 self,
214 fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
215 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>) {
216 Brand::ref_filter_map(self, fa)
217 }
218 }
219
220 #[document_type_parameters(
229 "The lifetime of the values.",
230 "The brand of the filterable.",
231 "The type of the value(s) inside the filterable.",
232 "The container type (owned or borrowed), inferred from the argument.",
233 "Dispatch marker type, inferred automatically. Either [`Val`](crate::dispatch::Val) or [`Ref`](crate::dispatch::Ref)."
234 )]
235 #[document_parameters("The closure implementing this dispatch.")]
236 pub trait FilterDispatch<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a + Clone, FA, Marker> {
237 #[document_signature]
239 #[document_parameters("The filterable instance containing the value(s).")]
241 #[document_returns(
243 "A new filterable instance containing only the values for which the predicate returned `true`."
244 )]
245 #[document_examples]
246 fn dispatch(
257 self,
258 fa: FA,
259 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>);
260 }
261
262 #[document_type_parameters(
266 "The lifetime of the values.",
267 "The brand of the filterable.",
268 "The type of the value(s) inside the filterable.",
269 "The closure type."
270 )]
271 #[document_parameters("The closure that takes owned values.")]
272 impl<'a, Brand, A, F>
273 FilterDispatch<
274 'a,
275 Brand,
276 A,
277 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
278 Val,
279 > for F
280 where
281 Brand: Filterable,
282 A: 'a + Clone,
283 F: Fn(A) -> bool + 'a,
284 {
285 #[document_signature]
286 #[document_parameters("The filterable instance containing the value(s).")]
288 #[document_returns(
290 "A new filterable instance containing only the values for which the predicate returned `true`."
291 )]
292 #[document_examples]
293 fn dispatch(
304 self,
305 fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
306 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>) {
307 Brand::filter(self, fa)
308 }
309 }
310
311 #[document_type_parameters(
317 "The lifetime of the values.",
318 "The borrow lifetime.",
319 "The brand of the filterable.",
320 "The type of the value(s) inside the filterable.",
321 "The closure type."
322 )]
323 #[document_parameters("The closure that takes references.")]
324 impl<'a, 'b, Brand, A, F>
325 FilterDispatch<
326 'a,
327 Brand,
328 A,
329 &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
330 Ref,
331 > for F
332 where
333 Brand: RefFilterable,
334 A: 'a + Clone,
335 F: Fn(&A) -> bool + 'a,
336 {
337 #[document_signature]
338 #[document_parameters("A reference to the filterable instance.")]
340 #[document_returns(
342 "A new filterable instance containing only the values for which the predicate returned `true`."
343 )]
344 #[document_examples]
345 fn dispatch(
356 self,
357 fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
358 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>) {
359 Brand::ref_filter(self, fa)
360 }
361 }
362
363 #[document_type_parameters(
372 "The lifetime of the values.",
373 "The brand of the filterable.",
374 "The type of the value(s) inside the filterable.",
375 "The container type (owned or borrowed), inferred from the argument.",
376 "Dispatch marker type, inferred automatically. Either [`Val`](crate::dispatch::Val) or [`Ref`](crate::dispatch::Ref)."
377 )]
378 #[document_parameters("The closure implementing this dispatch.")]
379 pub trait PartitionDispatch<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a + Clone, FA, Marker> {
380 #[document_signature]
382 #[document_parameters("The filterable instance containing the value(s).")]
384 #[document_returns(
386 "A tuple of two filterable instances: the first contains elements satisfying the predicate, the second contains the rest."
387 )]
388 #[document_examples]
389 fn dispatch(
401 self,
402 fa: FA,
403 ) -> (
404 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
405 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
406 );
407 }
408
409 #[document_type_parameters(
413 "The lifetime of the values.",
414 "The brand of the filterable.",
415 "The type of the value(s) inside the filterable.",
416 "The closure type."
417 )]
418 #[document_parameters("The closure that takes owned values.")]
419 impl<'a, Brand, A, F>
420 PartitionDispatch<
421 'a,
422 Brand,
423 A,
424 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
425 Val,
426 > for F
427 where
428 Brand: Filterable,
429 A: 'a + Clone,
430 F: Fn(A) -> bool + 'a,
431 {
432 #[document_signature]
433 #[document_parameters("The filterable instance containing the value(s).")]
435 #[document_returns(
437 "A tuple of two filterable instances: the first contains elements satisfying the predicate, the second contains the rest."
438 )]
439 #[document_examples]
440 fn dispatch(
452 self,
453 fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
454 ) -> (
455 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
456 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
457 ) {
458 Brand::partition(self, fa)
459 }
460 }
461
462 #[document_type_parameters(
468 "The lifetime of the values.",
469 "The borrow lifetime.",
470 "The brand of the filterable.",
471 "The type of the value(s) inside the filterable.",
472 "The closure type."
473 )]
474 #[document_parameters("The closure that takes references.")]
475 impl<'a, 'b, Brand, A, F>
476 PartitionDispatch<
477 'a,
478 Brand,
479 A,
480 &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
481 Ref,
482 > for F
483 where
484 Brand: RefFilterable,
485 A: 'a + Clone,
486 F: Fn(&A) -> bool + 'a,
487 {
488 #[document_signature]
489 #[document_parameters("A reference to the filterable instance.")]
491 #[document_returns(
493 "A tuple of two filterable instances: the first contains elements satisfying the predicate, the second contains the rest."
494 )]
495 #[document_examples]
496 fn dispatch(
508 self,
509 fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
510 ) -> (
511 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
512 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
513 ) {
514 Brand::ref_partition(self, fa)
515 }
516 }
517
518 #[document_type_parameters(
527 "The lifetime of the values.",
528 "The brand of the filterable.",
529 "The type of the value(s) inside the filterable.",
530 "The error type produced by the partitioning function.",
531 "The success type produced by the partitioning function.",
532 "The container type (owned or borrowed), inferred from the argument.",
533 "Dispatch marker type, inferred automatically. Either [`Val`](crate::dispatch::Val) or [`Ref`](crate::dispatch::Ref)."
534 )]
535 #[document_parameters("The closure implementing this dispatch.")]
536 pub trait PartitionMapDispatch<
537 'a,
538 Brand: Kind_cdc7cd43dac7585f,
539 A: 'a,
540 E: 'a,
541 O: 'a,
542 FA,
543 Marker,
544 > {
545 #[document_signature]
547 #[document_parameters("The filterable instance containing the value(s).")]
549 #[document_returns(
551 "A tuple of two filterable instances: the first contains the `Err` values, the second contains the `Ok` values."
552 )]
553 #[document_examples]
554 fn dispatch(
567 self,
568 fa: FA,
569 ) -> (
570 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
571 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, O>),
572 );
573 }
574
575 #[document_type_parameters(
579 "The lifetime of the values.",
580 "The brand of the filterable.",
581 "The type of the value(s) inside the filterable.",
582 "The error type produced by the partitioning function.",
583 "The success type produced by the partitioning function.",
584 "The closure type."
585 )]
586 #[document_parameters("The closure that takes owned values.")]
587 impl<'a, Brand, A, E, O, F>
588 PartitionMapDispatch<
589 'a,
590 Brand,
591 A,
592 E,
593 O,
594 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
595 Val,
596 > for F
597 where
598 Brand: Filterable,
599 A: 'a,
600 E: 'a,
601 O: 'a,
602 F: Fn(A) -> Result<O, E> + 'a,
603 {
604 #[document_signature]
605 #[document_parameters("The filterable instance containing the value(s).")]
607 #[document_returns(
609 "A tuple of two filterable instances: the first contains the `Err` values, the second contains the `Ok` values."
610 )]
611 #[document_examples]
612 fn dispatch(
625 self,
626 fa: Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
627 ) -> (
628 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
629 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, O>),
630 ) {
631 Brand::partition_map(self, fa)
632 }
633 }
634
635 #[document_type_parameters(
641 "The lifetime of the values.",
642 "The borrow lifetime.",
643 "The brand of the filterable.",
644 "The type of the value(s) inside the filterable.",
645 "The error type produced by the partitioning function.",
646 "The success type produced by the partitioning function.",
647 "The closure type."
648 )]
649 #[document_parameters("The closure that takes references.")]
650 impl<'a, 'b, Brand, A, E, O, F>
651 PartitionMapDispatch<
652 'a,
653 Brand,
654 A,
655 E,
656 O,
657 &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
658 Ref,
659 > for F
660 where
661 Brand: RefFilterable,
662 A: 'a,
663 E: 'a,
664 O: 'a,
665 F: Fn(&A) -> Result<O, E> + 'a,
666 {
667 #[document_signature]
668 #[document_parameters("A reference to the filterable instance.")]
670 #[document_returns(
672 "A tuple of two filterable instances: the first contains the `Err` values, the second contains the `Ok` values."
673 )]
674 #[document_examples]
675 fn dispatch(
688 self,
689 fa: &'b Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
690 ) -> (
691 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
692 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, O>),
693 ) {
694 Brand::ref_partition_map(self, fa)
695 }
696 }
697
698 #[document_signature]
709 #[document_type_parameters(
711 "The lifetime of the values.",
712 "The container type (owned or borrowed). Brand is inferred from this.",
713 "The type of the value(s) inside the filterable.",
714 "The brand, inferred via InferableBrand from FA and the element type."
715 )]
716 #[document_parameters(
718 "The predicate to apply to each value.",
719 "The filterable instance (owned or borrowed)."
720 )]
721 #[document_returns(
723 "A new filterable instance containing only the values satisfying the predicate."
724 )]
725 #[document_examples]
726 pub fn filter<'a, FA, A: 'a + Clone, Brand>(
734 f: impl FilterDispatch<
735 'a,
736 Brand,
737 A,
738 FA,
739 <FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
740 >,
741 fa: FA,
742 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>)
743 where
744 Brand: Kind_cdc7cd43dac7585f,
745 FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
746 f.dispatch(fa)
747 }
748
749 #[document_signature]
758 #[document_type_parameters(
760 "The lifetime of the values.",
761 "The container type (owned or borrowed). Brand is inferred from this.",
762 "The type of the value(s) inside the filterable.",
763 "The type of the result(s) of applying the function.",
764 "The brand, inferred via InferableBrand from FA and the element type."
765 )]
766 #[document_parameters(
768 "The function to apply to each value. Returns `Some(b)` to keep or `None` to discard.",
769 "The filterable instance (owned or borrowed)."
770 )]
771 #[document_returns("A new filterable instance containing only the kept values.")]
773 #[document_examples]
774 pub fn filter_map<'a, FA, A: 'a, B: 'a, Brand>(
782 f: impl FilterMapDispatch<
783 'a,
784 Brand,
785 A,
786 B,
787 FA,
788 <FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
789 >,
790 fa: FA,
791 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>)
792 where
793 Brand: Kind_cdc7cd43dac7585f,
794 FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
795 f.dispatch(fa)
796 }
797
798 #[document_signature]
807 #[document_type_parameters(
809 "The lifetime of the values.",
810 "The container type (owned or borrowed). Brand is inferred from this.",
811 "The type of the value(s) inside the filterable.",
812 "The brand, inferred via InferableBrand from FA and the element type."
813 )]
814 #[document_parameters(
816 "The predicate to apply to each value.",
817 "The filterable instance (owned or borrowed)."
818 )]
819 #[document_returns("A tuple of two filterable instances split by the predicate.")]
821 #[document_examples]
822 pub fn partition<'a, FA, A: 'a + Clone, Brand>(
831 f: impl PartitionDispatch<
832 'a,
833 Brand,
834 A,
835 FA,
836 <FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
837 >,
838 fa: FA,
839 ) -> (
840 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
841 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
842 )
843 where
844 Brand: Kind_cdc7cd43dac7585f,
845 FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
846 f.dispatch(fa)
847 }
848
849 #[document_signature]
858 #[document_type_parameters(
860 "The lifetime of the values.",
861 "The container type (owned or borrowed). Brand is inferred from this.",
862 "The type of the value(s) inside the filterable.",
863 "The error type produced by the partitioning function.",
864 "The success type produced by the partitioning function.",
865 "The brand, inferred via InferableBrand from FA and the element type."
866 )]
867 #[document_parameters(
869 "The function to apply to each value. Returns `Ok(o)` or `Err(e)`.",
870 "The filterable instance (owned or borrowed)."
871 )]
872 #[document_returns("A tuple of two filterable instances: `Err` values and `Ok` values.")]
874 #[document_examples]
875 pub fn partition_map<'a, FA, A: 'a, E: 'a, O: 'a, Brand>(
884 f: impl PartitionMapDispatch<
885 'a,
886 Brand,
887 A,
888 E,
889 O,
890 FA,
891 <FA as InferableBrand_cdc7cd43dac7585f<'a, Brand, A>>::Marker,
892 >,
893 fa: FA,
894 ) -> (
895 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
896 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, O>),
897 )
898 where
899 Brand: Kind_cdc7cd43dac7585f,
900 FA: InferableBrand_cdc7cd43dac7585f<'a, Brand, A>, {
901 f.dispatch(fa)
902 }
903
904 pub mod explicit {
911 use super::*;
912
913 #[document_signature]
931 #[document_type_parameters(
933 "The lifetime of the values.",
934 "The brand of the filterable.",
935 "The type of the value(s) inside the filterable.",
936 "The type of the result(s) of applying the function.",
937 "The container type (owned or borrowed), inferred from the argument.",
938 "Dispatch marker type, inferred automatically."
939 )]
940 #[document_parameters(
942 "The function to apply to each value. Returns `Some(b)` to keep the value or `None` to discard it.",
943 "The filterable instance (owned for Val, borrowed for Ref)."
944 )]
945 #[document_returns(
947 "A new filterable instance containing only the values for which the function returned `Some`."
948 )]
949 #[document_examples]
951 pub fn filter_map<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a, B: 'a, FA, Marker>(
971 f: impl FilterMapDispatch<'a, Brand, A, B, FA, Marker>,
972 fa: FA,
973 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, B>) {
974 f.dispatch(fa)
975 }
976
977 #[document_signature]
995 #[document_type_parameters(
997 "The lifetime of the values.",
998 "The brand of the filterable.",
999 "The type of the value(s) inside the filterable.",
1000 "The container type (owned or borrowed), inferred from the argument.",
1001 "Dispatch marker type, inferred automatically."
1002 )]
1003 #[document_parameters(
1005 "The predicate to apply to each value. Returns `true` to keep the value or `false` to discard it.",
1006 "The filterable instance (owned for Val, borrowed for Ref)."
1007 )]
1008 #[document_returns(
1010 "A new filterable instance containing only the values for which the predicate returned `true`."
1011 )]
1012 #[document_examples]
1014 pub fn filter<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a + Clone, FA, Marker>(
1030 f: impl FilterDispatch<'a, Brand, A, FA, Marker>,
1031 fa: FA,
1032 ) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>) {
1033 f.dispatch(fa)
1034 }
1035
1036 #[document_signature]
1054 #[document_type_parameters(
1056 "The lifetime of the values.",
1057 "The brand of the filterable.",
1058 "The type of the value(s) inside the filterable.",
1059 "The container type (owned or borrowed), inferred from the argument.",
1060 "Dispatch marker type, inferred automatically."
1061 )]
1062 #[document_parameters(
1064 "The predicate to apply to each value. Returns `true` for the first partition or `false` for the second.",
1065 "The filterable instance (owned for Val, borrowed for Ref)."
1066 )]
1067 #[document_returns(
1069 "A tuple of two filterable instances: the first contains elements satisfying the predicate, the second contains the rest."
1070 )]
1071 #[document_examples]
1073 pub fn partition<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a + Clone, FA, Marker>(
1091 f: impl PartitionDispatch<'a, Brand, A, FA, Marker>,
1092 fa: FA,
1093 ) -> (
1094 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
1095 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, A>),
1096 ) {
1097 f.dispatch(fa)
1098 }
1099
1100 #[document_signature]
1118 #[document_type_parameters(
1120 "The lifetime of the values.",
1121 "The brand of the filterable.",
1122 "The type of the value(s) inside the filterable.",
1123 "The error type produced by the partitioning function.",
1124 "The success type produced by the partitioning function.",
1125 "The container type (owned or borrowed), inferred from the argument.",
1126 "Dispatch marker type, inferred automatically."
1127 )]
1128 #[document_parameters(
1130 "The function to apply to each value. Returns `Ok(o)` for the success partition or `Err(e)` for the error partition.",
1131 "The filterable instance (owned for Val, borrowed for Ref)."
1132 )]
1133 #[document_returns(
1135 "A tuple of two filterable instances: the first contains the `Err` values, the second contains the `Ok` values."
1136 )]
1137 #[document_examples]
1139 pub fn partition_map<'a, Brand: Kind_cdc7cd43dac7585f, A: 'a, E: 'a, O: 'a, FA, Marker>(
1159 f: impl PartitionMapDispatch<'a, Brand, A, E, O, FA, Marker>,
1160 fa: FA,
1161 ) -> (
1162 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, E>),
1163 Apply!(<Brand as Kind!( type Of<'a, T: 'a>: 'a; )>::Of<'a, O>),
1164 ) {
1165 f.dispatch(fa)
1166 }
1167 }
1168}
1169
1170pub use inner::*;