@@ -31,6 +31,7 @@ mod find;
31
31
mod find_map;
32
32
mod fold;
33
33
mod fuse;
34
+ mod ge;
34
35
mod inspect;
35
36
mod min_by;
36
37
mod next;
@@ -50,6 +51,7 @@ use filter_map::FilterMap;
50
51
use find:: FindFuture ;
51
52
use find_map:: FindMapFuture ;
52
53
use fold:: FoldFuture ;
54
+ use ge:: GeFuture ;
53
55
use min_by:: MinByFuture ;
54
56
use next:: NextFuture ;
55
57
use nth:: NthFuture ;
@@ -1081,7 +1083,45 @@ extension_trait! {
1081
1083
{
1082
1084
PartialCmpFuture :: new( self , other)
1083
1085
}
1084
-
1086
+
1087
+ #[ doc = r#"
1088
+ Determines if the elements of this `Stream` are lexicographically
1089
+ greater than or equal to those of another.
1090
+
1091
+ # Examples
1092
+ ```
1093
+ # fn main() { async_std::task::block_on(async {
1094
+ #
1095
+ use async_std::prelude::*;
1096
+ use std::collections::VecDeque;
1097
+
1098
+ let single: VecDeque<isize> = vec![1].into_iter().collect();
1099
+ let single_gt: VecDeque<isize> = vec![10].into_iter().collect();
1100
+ let multi: VecDeque<isize> = vec![1,2].into_iter().collect();
1101
+ let multi_gt: VecDeque<isize> = vec![1,5].into_iter().collect();
1102
+
1103
+ assert_eq!(single.clone().ge(single.clone()).await, true);
1104
+ assert_eq!(single_gt.clone().ge(single.clone()).await, true);
1105
+
1106
+ assert_eq!(multi.clone().ge(single_gt.clone()).await, false);
1107
+ assert_eq!(multi_gt.clone().ge(multi.clone()).await, true);
1108
+
1109
+
1110
+ #
1111
+ # }) }
1112
+ ```
1113
+ "# ]
1114
+ fn ge<S >(
1115
+ self ,
1116
+ other: S
1117
+ ) -> impl Future <Output = bool > + ' _ [ GeFuture <Self , S >]
1118
+ where
1119
+ Self : Sized + Stream ,
1120
+ S : Stream ,
1121
+ Self :: Item : PartialOrd <S :: Item >,
1122
+ {
1123
+ GeFuture :: new( self , other)
1124
+ }
1085
1125
}
1086
1126
1087
1127
impl <S : Stream + Unpin + ?Sized > Stream for Box <S > {
0 commit comments