[−][src]Struct derive_utils::EnumData
A structure to make trait implementation to enums more efficient.
Methods
impl EnumData
[src]
pub fn new<E>(maybe_enum: &E) -> Result<Self> where
E: MaybeEnum,
[src]
E: MaybeEnum,
Constructs a new EnumData
.
pub fn make_impl(&self) -> Result<EnumImpl>
[src]
Constructs a new EnumImpl
.
pub fn impl_with_capacity(&self, capacity: usize) -> Result<EnumImpl>
[src]
Constructs a new EnumImpl
with the specified capacity..
pub fn make_impl_trait<I>(
&self,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl> where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
[src]
&self,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl> 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
pub fn impl_trait_with_capacity<I>(
&self,
capacity: usize,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl> where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
[src]
&self,
capacity: usize,
trait_path: Path,
supertraits_types: I,
item: ItemTrait
) -> Result<EnumImpl> where
I: IntoIterator<Item = Ident>,
I::IntoIter: ExactSizeIterator,
Constructs a new EnumImpl
from ItemTrait
with the specified capacity.
See EnumData::make_impl_trait
for supported item types.
Auto Trait Implementations
impl !Send for EnumData
impl Unpin for EnumData
impl !Sync for EnumData
impl UnwindSafe for EnumData
impl !RefUnwindSafe for EnumData
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,