auto_enums_derive 0.5.4

This library provides an attribute macro like a wrapper of `#[derive]`, implementing the supported traits and passing unsupported traits to `#[derive]`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::utils::*;

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

pub(crate) fn derive(data: &Data, stack: &mut Stack<ItemImpl>) -> Result<()> {
    derive_trait!(
        data,
        Some(ident("Item")),
        parse_quote!(::core::iter::FusedIterator)?,
        parse_quote! {
            trait FusedIterator: ::core::iter::Iterator {}
        }?,
    )
    .map(|item| stack.push(item))
}