@@ -32,6 +32,7 @@ mod find_map;
32
32
mod fold;
33
33
mod for_each;
34
34
mod fuse;
35
+ mod ge;
35
36
mod inspect;
36
37
mod map;
37
38
mod min_by;
@@ -54,6 +55,7 @@ use find::FindFuture;
54
55
use find_map:: FindMapFuture ;
55
56
use fold:: FoldFuture ;
56
57
use for_each:: ForEachFuture ;
58
+ use ge:: GeFuture ;
57
59
use min_by:: MinByFuture ;
58
60
use next:: NextFuture ;
59
61
use nth:: NthFuture ;
@@ -1197,7 +1199,45 @@ extension_trait! {
1197
1199
{
1198
1200
PartialCmpFuture :: new( self , other)
1199
1201
}
1200
-
1202
+
1203
+ #[ doc = r#"
1204
+ Determines if the elements of this `Stream` are lexicographically
1205
+ greater than or equal to those of another.
1206
+
1207
+ # Examples
1208
+ ```
1209
+ # fn main() { async_std::task::block_on(async {
1210
+ #
1211
+ use async_std::prelude::*;
1212
+ use std::collections::VecDeque;
1213
+
1214
+ let single: VecDeque<isize> = vec![1].into_iter().collect();
1215
+ let single_gt: VecDeque<isize> = vec![10].into_iter().collect();
1216
+ let multi: VecDeque<isize> = vec![1,2].into_iter().collect();
1217
+ let multi_gt: VecDeque<isize> = vec![1,5].into_iter().collect();
1218
+
1219
+ assert_eq!(single.clone().ge(single.clone()).await, true);
1220
+ assert_eq!(single_gt.clone().ge(single.clone()).await, true);
1221
+
1222
+ assert_eq!(multi.clone().ge(single_gt.clone()).await, false);
1223
+ assert_eq!(multi_gt.clone().ge(multi.clone()).await, true);
1224
+
1225
+
1226
+ #
1227
+ # }) }
1228
+ ```
1229
+ "# ]
1230
+ fn ge<S >(
1231
+ self ,
1232
+ other: S
1233
+ ) -> impl Future <Output = bool > + ' _ [ GeFuture <Self , S >]
1234
+ where
1235
+ Self : Sized + Stream ,
1236
+ S : Stream ,
1237
+ Self :: Item : PartialOrd <S :: Item >,
1238
+ {
1239
+ GeFuture :: new( self , other)
1240
+ }
1201
1241
}
1202
1242
1203
1243
impl <S : Stream + Unpin + ?Sized > Stream for Box <S > {
0 commit comments