pub trait GeneratorSupplement<T> {
// Required methods
fn add_imports(&self, scope: &mut Scope);
fn impl_supplement(&self, scope: &mut Scope, definition: &Definition<T>);
// Provided methods
fn extend_impl_of_struct(
&self,
_name: &str,
_impl_scope: &mut Impl,
_fields: &[Field]
) { ... }
fn extend_impl_of_enum(
&self,
_name: &str,
_impl_scope: &mut Impl,
_enumeration: &PlainEnum
) { ... }
fn extend_impl_of_data_enum(
&self,
_name: &str,
_impl_scope: &mut Impl,
_enumeration: &DataEnum
) { ... }
fn extend_impl_of_tuple(
&self,
_name: &str,
_impl_scope: &mut Impl,
_definition: &RustType
) { ... }
}