@@ -32,6 +32,7 @@ mod find_map;
3232mod fold;
3333mod for_each;
3434mod fuse;
35+ mod ge;
3536mod inspect;
3637mod map;
3738mod min_by;
@@ -54,6 +55,7 @@ use find::FindFuture;
5455use find_map:: FindMapFuture ;
5556use fold:: FoldFuture ;
5657use for_each:: ForEachFuture ;
58+ use ge:: GeFuture ;
5759use min_by:: MinByFuture ;
5860use next:: NextFuture ;
5961use nth:: NthFuture ;
@@ -1197,7 +1199,45 @@ extension_trait! {
11971199 {
11981200 PartialCmpFuture :: new( self , other)
11991201 }
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+ }
12011241 }
12021242
12031243 impl <S : Stream + Unpin + ?Sized > Stream for Box <S > {
0 commit comments