auto_enums_derive 0.7.7

An internal crate to support auto_enums - do not use directly
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::utils::*;

pub(crate) const NAME: &[&str] = &["rayon::ParallelIterator"];

pub(crate) fn derive(data: &Data) -> Result<TokenStream> {
    derive_trait(data, parse_quote!(::rayon::iter::ParallelIterator), None, parse_quote! {
        trait ParallelIterator {
            type Item;
            #[inline]
            fn drive_unindexed<__C>(self, consumer: __C) -> __C::Result
            where
                __C: ::rayon::iter::plumbing::UnindexedConsumer<Self::Item>;
            #[inline]
            fn opt_len(&self) -> ::core::option::Option<usize>;
        }
    })
}