Attribute Macro derive_where::derive_where
source · #[derive_where]
Expand description
Item-level options:
#[derive_where(crate = path)]
: Specify path to thederive_where
crate.#[derive_where(Clone, ..; T, ..)]
: Specify traits to implement and optionally bounds.#[derive_where(Zeroize(crate = path))]
: Specify path toZeroize
trait.#[derive_where(ZeroizeOnDrop(crate = path))]
: Specify path toZeroizeOnDrop
trait.
#[derive_where(skip_inner(EqHashOrd, ..))]
: Skip all fields in the item. Optionally specify trait groups to constrain skipping fields. Only works for structs, for enums use this on the variant-level.
Variant-level options:
#[derive_where(default)]
: Uses this variant as the default for theDefault
implementation.#[derive_where(skip_inner(EqHashOrd, ..))]
: Skip all fields in this variant. Optionally specify trait groups to constrain skipping fields.
Field-level options:
#[derive_where(skip(EqHashOrd, ...))]
: Skip field. Optionally specify trait groups to constrain skipping field.#[derive_where(Zeroize(fqs))]
: Use fully-qualified-syntax when implementingZeroize
.
See the crate level description for more details.