#[ cfg( not( feature = "no_std" ) ) ]
pub( crate ) mod private
{
use ::itertools::process_results;
pub trait IterExt
where
Self : core::iter::Iterator,
{
fn map_result< F, RE, El >( self, f : F ) -> core::result::Result< Vec< El >, RE >
where
Self : Sized + Clone,
F : FnMut( < Self as core::iter::Iterator >::Item ) -> core::result::Result< El, RE >,
RE : core::fmt::Debug,
;
}
impl< Iterator > IterExt for Iterator
where
Iterator : core::iter::Iterator,
{
fn map_result< F, RE, El >( self, f : F ) -> core::result::Result< Vec< El >, RE >
where
Self : Sized + Clone,
F : FnMut( < Self as core::iter::Iterator >::Item ) -> core::result::Result< El, RE >,
RE : core::fmt::Debug,
{
let vars_maybe = self.map( f );
let vars : Vec< _ > = process_results( vars_maybe, | iter | iter.collect() )?;
Ok( vars )
}
}
}
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
#[ cfg( feature = "enabled" ) ]
pub use protected::*;
#[ cfg( feature = "enabled" ) ]
pub mod protected
{
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::orphan::*;
}
#[ cfg( feature = "enabled" ) ]
pub mod orphan
{
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::exposed::*;
}
pub mod exposed
{
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use super::prelude::*;
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use ::itertools::
{
all,
any,
assert_equal,
chain,
cloned,
concat,
cons_tuples,
diff_with,
enumerate,
equal,
fold,
interleave,
intersperse,
intersperse_with,
iterate,
join,
kmerge,
kmerge_by,
max,
merge,
merge_join_by,
min,
multipeek,
multiunzip,
multizip,
partition,
peek_nth,
process_results,
put_back,
put_back_n,
rciter,
repeat_n,
rev,
sorted,
unfold,
zip_eq,
};
#[ cfg( not( feature = "no_std" ) ) ]
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use std::iter::zip;
}
pub mod prelude
{
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
pub use ::itertools::
{
Diff,
Either,
EitherOrBoth,
FoldWhile,
MinMaxResult,
Position,
Itertools,
PeekingNext,
};
#[ doc( inline ) ]
#[ allow( unused_imports ) ]
#[ cfg( not( feature = "no_std" ) ) ]
pub use super::private::IterExt;
}