Struct virtue::generate::Impl[][src]

pub struct Impl<'a> { /* fields omitted */ }
Expand description

A helper struct for implementing functions for a given struct or enum.

Implementations

Add a function to the trait implementation.

generator.impl().generate_fn("bar") results in code like:

impl <struct or enum> {
    fn bar() {}
}

See FnBuilder for more options, as well as information on how to fill the function body.

Trait Implementations

Executes the destructor for this type. Read more

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

Performs the conversion.

Performs the conversion.

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.