Struct derive_utils::EnumImpl
source · pub struct EnumImpl<'a> { /* private fields */ }
Implementations§
source§impl<'a> EnumImpl<'a>
impl<'a> EnumImpl<'a>
pub fn trait_(&mut self) -> &mut Option<Trait>
pub fn self_ty(&mut self) -> &mut Type
pub fn push_generic_param(&mut self, param: GenericParam)
pub fn push_generic_param_ident(&mut self, ident: Ident)
pub fn push_where_predicate(&mut self, predicate: WherePredicate)
pub fn push_item(&mut self, item: ImplItem)
pub fn push_method_pin_ref(&mut self, item: TraitItemMethod) -> Result<()>
👎Deprecated: Use
push_method
insteadpub fn push_method_pin_mut(&mut self, item: TraitItemMethod) -> Result<()>
👎Deprecated: Use
push_method
insteadsourcepub fn push_method(&mut self, item: TraitItemMethod) -> Result<()>
pub fn push_method(&mut self, item: TraitItemMethod) -> Result<()>
Appends a method from TraitItemMethod
.
A method that has the first argument other than the following is error:
&self
&mut self
self
mut self
self: Pin<&Self>
self: Pin<&mut Self>
sourcepub fn append_items_from_trait(&mut self, item: ItemTrait) -> Result<()>
pub fn append_items_from_trait(&mut self, item: ItemTrait) -> Result<()>
Appends items from ItemTrait
.
TraitItem::Method
that has the first argument other than the following is error:
&self
&mut self
self
mut self
self: Pin<&Self>
self: Pin<&mut Self>
The following items are ignored:
- Generic associated types (GAT) (
TraitItem::Method
that has generics) TraitItem::Const
TraitItem::Macro
TraitItem::Verbatim