[][src]Module butcher::methods

Different ways to butcher a field.

This module defines the behaviour of each butchering method, and how they interact with the butcher derive macro.

This module contains multiple butchering methods, represented by structs. These butchering methods implement the ButcheringMethod trait. This trait gives a definition of how the output data must be generated based on the input (what output type, what to do when input is borrowed and what to do when input is owned).

The ButcherField trait is implemented for every structure associated to a field of struct or enum on which Butcher is derived.

Structs

AsDeref

The as deref method.

Copy

The copy method.

Rebutcher

The rebutcher method.

Regular

The regular method, used by default.

Unbox

The unbox method.

Traits

ButcherField

Define the behaviour of a specific field of a struct or enum when it is butchered.

ButcheringMethod

Allow to unify the behavior of the different butchering methods.