[−][src]Struct derive_utils::EnumImpl
A builder for implementing traits for enums.
Methods
impl<'a> EnumImpl<'a>
[src]
pub fn self_ty(&mut self) -> &mut Type
[src]
pub fn push_generic_param(&mut self, param: GenericParam)
[src]
pub fn push_generic_param_ident(&mut self, ident: Ident)
[src]
pub fn push_where_predicate(&mut self, predicate: WherePredicate)
[src]
Appends a predicate to the back of where
-clause.
pub fn push_item(&mut self, item: ImplItem)
[src]
Appends an item to impl items.
pub fn push_method(&mut self, item: TraitItemMethod) -> Result<()>
[src]
Appends a method from TraitItemMethod
to impl items.
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>
pub fn append_items_from_trait(&mut self, item: ItemTrait) -> Result<()>
[src]
Appends items from ItemTrait
to impl items.
See EnumData::make_impl_trait
for supported item types.
pub fn build(self) -> TokenStream
[src]
pub fn build_item(self) -> ItemImpl
[src]
Auto Trait Implementations
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,