Struct derive_utils::EnumData
source · pub struct EnumData { /* private fields */ }
Implementations§
source§impl EnumData
impl EnumData
sourcepub fn impl_with_capacity<'a>(&'a self, capacity: usize) -> Result<EnumImpl<'a>>
pub fn impl_with_capacity<'a>(&'a self, capacity: usize) -> Result<EnumImpl<'a>>
Constructs a new EnumImpl
with the specified capacity..
sourcepub fn make_impl_trait<'a, I>(
&'a self,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl<'a>>where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
pub fn make_impl_trait<'a, I>(
&'a self,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl<'a>>where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
Constructs a new EnumImpl
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
sourcepub fn impl_trait_with_capacity<'a, I>(
&'a self,
capacity: usize,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl<'a>>where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
pub fn impl_trait_with_capacity<'a, I>(
&'a self,
capacity: usize,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl<'a>>where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
Constructs a new EnumImpl
from ItemTrait
with the specified capacity.
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