pub trait GenerateImpl {
// Required methods
fn generate_const(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemConst,
) -> Result<ImplItemConst>;
fn generate_fn(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemFn,
) -> Result<ImplItemFn>;
fn generate_type(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemType,
) -> Result<ImplItemType>;
}Expand description
Generates missing items.
Required Methods§
Sourcefn generate_const(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemConst,
) -> Result<ImplItemConst>
fn generate_const( &mut self, ctx: ImplContext<'_>, item: &TraitItemConst, ) -> Result<ImplItemConst>
Implements an associated constant.
Sourcefn generate_fn(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemFn,
) -> Result<ImplItemFn>
fn generate_fn( &mut self, ctx: ImplContext<'_>, item: &TraitItemFn, ) -> Result<ImplItemFn>
Implements an associated function.
Sourcefn generate_type(
&mut self,
ctx: ImplContext<'_>,
item: &TraitItemType,
) -> Result<ImplItemType>
fn generate_type( &mut self, ctx: ImplContext<'_>, item: &TraitItemType, ) -> Result<ImplItemType>
Implements an associated type.