fn impl_enum(ast: &DeriveInput, data: &DataEnum) -> Result<TokenStream, Error> {
	if data.variants.is_empty() {
		return Err(Error::new_spanned(
			ast,
			"#[derive(Data)] cannot be implemented for enums with zero variants",
		));
	}
	for v in data.variants.iter() {
		if v.fields.iter().len() == 0 {
			return Err(Error::new_spanned(
				v,
				"#[derive(Data)] cannot be implemented for enums with non-unit variants",
			));
		}
	}

	todo!("#[derive(Data)] on enums not yet implemented: Tracking at https://github.com/constellation-rs/amadeus/issues/62")
}
/// Implement on unit variant enums.
Implement on unit variant enums.
Implement on unit variant enums .
fn impl_enum(ast: &DeriveInput, data: &DataEnum) -> Result<TokenStream, Error> {
	if data.variants.is_empty() {
		return Err(Error::new_spanned(
			ast,
			"#[derive(Data)] cannot be implemented for enums with zero variants",
		));
	}
	for v in data.variants.iter() {
		if v.fields.iter().len() == 0 {
			return Err(Error::new_spanned(
				v,
				"#[derive(Data)] cannot be implemented for enums with non-unit variants",
			));
		}
	}
	todo!("#[derive(Data)] on enums not yet implemented: Tracking at https://github.com/constellation-rs/amadeus/issues/62")
}
fn impl_enum ( ast : & DeriveInput , data : & DataEnum ) -> Result < TokenStream , Error > { if data . variants . is_empty ( ) { return Err ( Error :: new_spanned ( ast , " " , ) ) ; } for v in data . variants . iter ( ) { if v . fields . iter ( ) . len ( ) == 0 { return Err ( Error :: new_spanned ( v , " " , ) ) ; } } todo ! ( " " ) }
Implement on unit variant enums.
Implement on unit variant enums .
ast
&DeriveInput
data
&DataEnum