pub struct EnumImpl<'a> { /* private fields */ }
Expand description

A builder for implementing a trait for enums.

Implementations

Creates a new EnumImpl.

Creates a new EnumImpl from a trait definition.

The following items are ignored:

Panics

Panics if a trait method has a body, no receiver, or a receiver other than the following:

  • &self
  • &mut self
  • self
  • self: Pin<&Self>
  • self: Pin<&mut Self>

Appends a generic type parameter to the back of generics.

Appends a predicate to the back of where-clause.

Appends an item to impl items.

Appends a method to impl items.

Panics

Panics if a trait method has a body, no receiver, or a receiver other than the following:

  • &self
  • &mut self
  • self
  • self: Pin<&Self>
  • self: Pin<&mut Self>

Appends items from a trait definition to impl items.

Panics

Panics if a trait method has a body, no receiver, or a receiver other than the following:

  • &self
  • &mut self
  • self
  • self: Pin<&Self>
  • self: Pin<&mut Self>

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.